You are not logged in.

#1 2010-10-26 20:14:54

victorhooi
Member
Registered: 2009-08-06
Posts: 109

Python Virtualenvwrapper - Big Python Move

Hi,

I've just done a fresh install of Arch64, and I've tried to install python-virtualenvwrapper.

I've added the following two lines to my ~/.bashrc file:

export WORKON_HOME=$HOME/.virtualenvs
source /usr/bin/virtualenvwrapper.sh

and created the ~/.virtualenvs directory.

However, when I startup a new bash shell or terminal, I get:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenvwrapper/hook_loader.py", line 9, in <module>
    import inspect
  File "/usr/lib/python2.7/inspect.py", line 42, in <module>
    from collections import namedtuple
ImportError: cannot import name namedtuple
virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2 and that PATH is set properly.

I'm assuming this has something to do with the big Python 2 to Python 3 move happening in Arch atm? I did notice python-virtualenvwrapper on the list at http://wiki.archlinux.org/index.php/Dev … _Todo_List, however, I'm not aware enough of what's happening to know how to fix this unfortunately.

Have I done something wrong on my setup, and it should be working? Or if it is indeed behaving as intended, is there any way to fix this for now? Or any timeline on when the package might be fixed?

Thanks,
Victor

Offline

#2 2010-10-27 13:19:20

kachelaqa
Member
Registered: 2010-09-26
Posts: 216

Re: Python Virtualenvwrapper - Big Python Move

i installed python-virtualenvwrapper and followed steps 1-4 of the setup detailed in /usr/bin/virtualenvwrapper.sh.

unfortunately, i can't reproduce your problem.

that traceback looks odd, because it is showing an error within python itself.

what happens when you try this:

$ python2
Python 2.7 (r27:82500, Oct  6 2010, 12:18:19) 
[GCC 4.5.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> 

do you get any import errors?

Offline

#3 2010-10-28 13:24:59

victorhooi
Member
Registered: 2009-08-06
Posts: 109

Re: Python Virtualenvwrapper - Big Python Move

heya,

For some reason, a reboot seems to have fixed it...I sourced the .bashrc again, and it created some new files in $HOME/.virtualenvs, and all seems good now...not sure what exactly happened before.

Cheers,
Victor

Offline

Board footer

Powered by FluxBB