VirtualBox中的Ubuntu服务器。我正在尝试安装VirtualEnv以开始学习Flask和bottle。我的设置的一些细节。
vks@UbSrVb:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="12.04.2 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.2 LTS)"
VERSION_ID="12.04"
vks@UbSrVb:~$ python --version
Python 2.7.3
vks@UbSrVb:~$ echo $VIRTUALENVWRAPPER_PYTHON
/usr/bin/python
vks@UbSrVb:~$ echo $VIRTUALENV_PYTHON
vks@UbSrVb:~$
引导虚拟机时,在控制台上出现以下错误
/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.
当我尝试初始化virtualenv时,出现以下错误
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
no_pip=options.no_pip)
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
try1
vks@UbSrVb:~/dropbox/venv$ ls try1/
bin include lib
vks@UbSrVb:~/dropbox/venv$
我的.bashrc条目
export WORKON_HOME='~/dropbox/venv/'
source '/usr/local/bin/virtualenvwrapper.sh'
问题1-根据启动时的错误,如何确保为VIRTUALENVWRAPPER_PYTHON = / usr / bin / python安装了virtualenv并正确设置了PATH?
问题2-即使使用sudo,我也会得到相同的“只读文件系统”错误?
我试过使用pip然后使用apt-get安装virtualenv,只是想尝试一下。
慕尼黑5688855
慕村225694
相关分类