WebFaction
Community site: login faq

Hey!

Atm I'm trying to get virtualenv and virtualenvwrapper running. I installed pip like told here: http://docs.webfaction.com/software/python.html#installing-packages-with-pip

Next i installed virtualenv with: pip-2.7 install virtualenv. But now when i try to install virtualenvwrapper with pip-2.7 install virtualenvwrapper i get the following:

[johannesfrey@web314 ~]$ pip-2.7 install virtualenvwrapper

Downloading/unpacking virtualenvwrapper Downloading virtualenvwrapper-3.6.tar.gz (184Kb): 184Kb downloaded Running setup.py egg_info for package virtualenvwrapper Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz Extracting in /tmp/tmptr8O6l Now working in /tmp/tmptr8O6l/distribute-0.6.10 Building a Distribute egg in /home/johannesfrey/build/virtualenvwrapper /home/johannesfrey/build/virtualenvwrapper/distribute-0.6.10-py2.7.egg

Requirement already satisfied (use --upgrade to upgrade): virtualenv in ./lib/python2.7 (from virtualenvwrapper) Downloading/unpacking virtualenv-clone (from virtualenvwrapper) Downloading virtualenv-clone-0.2.4.tar.gz Running setup.py egg_info for package virtualenv-clone

Downloading/unpacking stevedore (from virtualenvwrapper) Downloading stevedore-0.3.tar.gz Running setup.py egg_info for package stevedore Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz Extracting in /tmp/tmpSdhsG9 Now working in /tmp/tmpSdhsG9/distribute-0.6.10 Building a Distribute egg in /home/johannesfrey/build/stevedore /home/johannesfrey/build/stevedore/distribute-0.6.10-py2.7.egg

warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.txt' under directory 'docs'
warning: no files found matching '*.py' under directory 'tests'

Downloading/unpacking distribute (from stevedore->virtualenvwrapper) Downloading distribute-0.6.28.tar.gz (627Kb): 627Kb downloaded Running setup.py egg_info for package distribute

Installing collected packages: virtualenvwrapper, virtualenv-clone, stevedore, distribute Running setup.py install for virtualenvwrapper

changing mode of build/scripts-2.7/virtualenvwrapper.sh from 664 to 775
changing mode of build/scripts-2.7/virtualenvwrapper_lazy.sh from 664 to 775
Skipping installation of /home/johannesfrey/lib/python2.7/virtualenvwrapper/__init__.py (namespace package)
Installing /home/johannesfrey/lib/python2.7/virtualenvwrapper-3.6-py2.7-nspkg.pth
changing mode of /home/johannesfrey/bin/virtualenvwrapper_lazy.sh to 775
changing mode of /home/johannesfrey/bin/virtualenvwrapper.sh to 775

Running setup.py install for virtualenv-clone

Installing virtualenv-clone script to /home/johannesfrey/bin

Running setup.py install for stevedore

warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.txt' under directory 'docs'
warning: no files found matching '*.py' under directory 'tests'

Running setup.py install for distribute Before install bootstrap. Scanning installed packages Setuptools installation detected at /usr/local/lib/python2.7/site-packages Non-egg installation Removing elements out of the way... Renaming /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info into /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info.OLD.1345705659.5 Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/johannesfrey/build/distribute/setup.py", line 131, in <module> _before_install() File "distribute_setup.py", line 363, in _before_install _fake_setuptools() File "distribute_setup.py", line 420, in _fake_setuptools res = _remove_flat_installation(setuptools_location) File "distribute_setup.py", line 224, in no_sandbox return function(args, *kw) File "distribute_setup.py", line 279, in _remove_flat_installation patched = _patch_egg_dir(pkg_info) File "distribute_setup.py", line 224, in no_sandbox return function(args, *kw) File "distribute_setup.py", line 347, in _patch_egg_dir _rename_path(path) File "distribute_setup.py", line 259, in _rename_path os.rename(path, new_name) OSError: [Errno 13] Permission denied Complete output from command /usr/local/bin/python2.7 -c "import setuptools;file='/home/johannesfrey/build/distribute/setup.py';exec(compile(open(file).read().replace('rn', 'n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-h7O7MG-record/install-record.txt: Before install bootstrap.

Scanning installed packages

Setuptools installation detected at /usr/local/lib/python2.7/site-packages

Non-egg installation

Removing elements out of the way...

Renaming /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info into /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info.OLD.1345705659.5

Traceback (most recent call last):

File "<string>", line 1, in <module>

File "/home/johannesfrey/build/distribute/setup.py", line 131, in <module>

_before_install()

File "distribute_setup.py", line 363, in _before_install

_fake_setuptools()

File "distribute_setup.py", line 420, in _fake_setuptools

res = _remove_flat_installation(setuptools_location)

File "distribute_setup.py", line 224, in __no_sandbox

return function(*args, **kw)

File "distribute_setup.py", line 279, in _remove_flat_installation

patched = _patch_egg_dir(pkg_info)

File "distribute_setup.py", line 224, in __no_sandbox

return function(*args, **kw)

File "distribute_setup.py", line 347, in _patch_egg_dir

_rename_path(path)

File "distribute_setup.py", line 259, in _rename_path

os.rename(path, new_name)

OSError: [Errno 13] Permission denied


Command /usr/local/bin/python2.7 -c "import setuptools;file='/home/johannesfrey/build/distribute/setup.py';exec(compile(open(file).read().replace('rn', 'n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-h7O7MG-record/install-record.txt failed with error code 1 in /home/johannesfrey/build/distribute Storing complete log in /home/johannesfrey/.pip/pip.log


I see at the end that there is a Permission denied. Can someone help me getting virtualenvwrapper installed?

Thanks in advance

asked 23 Aug '12, 06:13

jotef
1123
accept rate: 0%


You will need to use setup.py to install virtualwrapper, here are the commands:

mkdir -p ~/bin ~/lib/python2.7 ~/src
cd ~/src
ln -s $HOME/lib/python2.7 $HOME/lib/python
wget http://pypi.python.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-3.6.tar.gz
tar zxf virtualenvwrapper-3.6.tar.gz
cd virtualenvwrapper-3.6
PYTHONPATH=$HOME/lib/python2.7 python2.7 setup.py install --home=$HOME
rm $HOME/lib/python
permanent link

answered 23 Aug '12, 07:30

timg ♦♦
1.3k4
accept rate: 30%

This does no longer seem to work. I am getting this error:

Moving elements out of the way... Renaming /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info to /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info.OLD.1370783952.05 error: Permission denied

As a workaround I will simply do pip-2.7 install virtualenvwrapper==3.5, which still works...

(09 Jun '13, 08:20) mbrochh

hey thx the installation worked fine!

but now every command i do with virtualenvwrapper (mkvirtualenv, rmvirtualenv...) i get the following:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader

I think somethings messed up... i had used virtualenvwrapper before but did an uninstall. now everything is strange...

edit: after i added:

export VIRTUALENVWRAPPER_PYTHON=$HOME/lib/python2.7

to my ~/.bashrc "mkvirtualenv" worked fine. but now everycommand gets followed by:

-bash: /home/johannesfrey/lib/python2.7: is a directory
-bash: /home/johannesfrey/lib/python2.7: is a directory

when i change it to:

VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python

i get the ImportError stated above... what am I doing wrong?

permanent link

answered 23 Aug '12, 08:11

jotef
1123
accept rate: 0%

edited 23 Aug '12, 08:42

Add this to your .bashrc:

export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7
if [ -f $HOME/bin/virtualenvwrapper.sh ]; then
    source $HOME/bin/virtualenvwrapper.sh
fi

Then run:

source .bashrc

and finally test a command:

mkvirtualenv env1
(23 Aug '12, 08:54) timg ♦♦

thank you very much! now it works! can you explain what the above if statement actually does?

(23 Aug '12, 09:16) jotef

The if statement just checks if the virtualenvwrapper.sh exists and if it does sources the file to create the hooks.

(23 Aug '12, 09:26) timg ♦♦

alright thanks! still one thing. when i exit my connection to webfaction and log in via ssh again following prompts:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader
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/local/bin/python and that PATH is
set properly.

but everything works after that. did I do something wrong when i installed virtualenv?

permanent link

answered 23 Aug '12, 10:07

jotef
1123
accept rate: 0%

ok i got it... i had to move the "export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7" up before "source /home/johannesfrey/bin/virtualenvwrapper.sh"...

thx again!

(23 Aug '12, 14:22) jotef
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×55
×54
×6

question asked: 23 Aug '12, 06:13

question was seen: 15,778 times

last updated: 09 Jun '13, 08:38

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM