[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Weechat-dev] [bug #35320] sys.path is incorrect when running in a pytho

From: Jamie Kirkpatrick
Subject: [Weechat-dev] [bug #35320] sys.path is incorrect when running in a python virtualenv
Date: Tue, 17 Jan 2012 14:06:47 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7

Follow-up Comment #2, bug #35320 (project weechat):

The main problem it can create is that it will mean stuff installed in the
virtualenv only will not be found when you try to import it.   It's simple to

1. Setup a virtualenv
2. Activate that virtualenv
3. Install pybuffer.py in python/autoload
4. Run weechat-curses
5. Create a pybuffer (/pybuffer)
6. Try to import your module.

This will fail because PYTHONPATH is incorrect for the python instance you are

You can confirm that you are running the virtualenv'd instance by doing:

import sys
print sys.executable

Actually this points to a wider issue with the Python plugin implementation. 
When you build your python extension loader you hard-link it to a specific
version of Python but it is not obvious to the user which version of Python
that is.  Experienced developers will probably be able to figure these kinds
of issues out but its fairly non-intuitive.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]