Ubuntu Server in VirtualBox. I am trying to install VirtualEnv to start learning Flask and bottle. Some details of my setup.

vks@UbSrVb:~$ cat /etc/os-release 
VERSION="12.04.2 LTS, Precise Pangolin"
PRETTY_NAME="Ubuntu precise (12.04.2 LTS)"

vks@UbSrVb:~$ python --version
Python 2.7.3


When I boot my Virtual Machine, I get the following error on my console

/usr/bin/python: No module named virtualenvwrapper
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/python and that PATH is
set properly.

When i try to initialize a virtualenv I get the following errors

vks@UbSrVb:~/dropbox/venv$ virtualenv try1
New python executable in try1/bin/python3.2
Also creating executable in try1/bin/python
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==1.9.1', 'console_scripts', 'virtualenv')()
  File "/usr/local/lib/python3.2/dist-packages/virtualenv.py", line 979, in main
  File "/usr/local/lib/python3.2/dist-packages/virtualenv.py", line 1081, in create_environment
    site_packages=site_packages, clear=clear))
  File "/usr/local/lib/python3.2/dist-packages/virtualenv.py", line 1499, in install_python
    os.symlink(py_executable_base, full_pth)
OSError: [Errno 30] Read-only file system

vks@UbSrVb:~/dropbox/venv$ ls
vks@UbSrVb:~/dropbox/venv$ ls try1/
bin  include  lib

My .bashrc entries

export WORKON_HOME='~/dropbox/venv/'
source '/usr/local/bin/virtualenvwrapper.sh'

Q1 - As per the error at bootup, How do I ensure virtualenv is installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly ?
Q2 - Even with sudo I get the same "Read-only file system" Error ?

I have tried installing virtualenv using pip and then apt-get, just to hit and try.


Your trying to install a virtualenv on a mountpoint that does not support symbolic links . If you look at the output of mount you will see has some mountpoint at /home/yourusername/dropbox. Try a different location, such as your home directory:

virtualenv --python=python2.7 flaskenv

(note: currently flask only works on python 2)

There is no point syncing the vritualenv on dropbox anyway. It won't work on another system unless its identical. You can sync between virtualenvs using pip requirements.txt files .


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.