Virtualenv不创建环境 [英] Virtualenv not creating an environment

查看:72
本文介绍了Virtualenv不创建环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 12.04上安装了Virtualenv,并使用它在统一桌面下的示例项目中工作.我正在使用VirtualBox,但统一桌面存在一些问题,因此更改为KDE桌面.

I installed Virtualenv on Ubuntu 12.04 and was using it to work on a sample project under the unity desktop. I'm using VirtualBox and was having some issues with the unity desktop so changed to the KDE desktop.

我现在正在尝试创建一个新项目,但是virtualenv不允许我在项目文件夹中创建新环境.在终端中,我导航到项目文件夹,键入virtualenv venv并获得以下错误消息:

I'm now trying to create a new project but the virtualenv won't allow me to create a new environment in my project folder. In the terminal I navigate to the project folder, type virtualenv venv and get the following error messages:

Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 3, in <module>
    virtualenv.main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
    never_download=options.never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1039, in create_environment
    site_packages=site_packages, clear=clear))
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1215, in install_python
    copyfile(stdinc_dir, inc_dir)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 430, in copyfile
    copyfileordir(src, dest)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 405, in copyfileordir
    shutil.copytree(src, dest, True)
  File "/usr/lib/python2.7/shutil.py", line 206, in copytree
    raise Error, errors
shutil.Error: [('/usr/include/python2.7/numpy', 'venv/include/python2.7/numpy', '[Errno 30] Read-only file system')]

有人可以帮我解决这个问题吗?我试过重新安装virtualenv,但没有任何乐趣.谢谢

Can anyone help me resolve this? I've tried reinstalling virtualenv but no joy. Thanks

推荐答案

好吧,在更深入的谷歌搜索后,发现这是VirtualBox问题,而不是Ubuntu问题.共享文件夹不受此活动的保护.我不知道它第一次如何/为什么起作用,但这是一个已知的错误.我在共享文件夹之外没有问题地创建了一个项目.感谢您输入Dougal.

Ok after a bit more in-depth googling found that this is a VirtualBox issue, not a Ubuntu problem. The shared folders are protected from this activity. I don't know how/why it worked the first time round but it is a known bug. I created a project outside of the shared folder with no problems. Thanks for the input Dougal.

这篇关于Virtualenv不创建环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆