我有一台安装了python并安装了virtualenvwrapper的Mac.我正在尝试通过运行来创建一个新环境:
mkvirtualenv Test
我得到以下错误:
New python executable in /Users/sIDharthnayyar/.virtualenvs/Test/bin/pythonInstalling setuptools,pip,wheel...done.Traceback (most recent call last): file "/library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",line 174,in _run_module_as_main "__main__",fname,loader,pkg_name) file "/library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",line 72,in _run_code exec code in run_globals file "/library/Python/2.7/site-packages/virtualenvwrapper/hook_loader.py",line 16,in
我在这里安装了python:
$which -a python /usr/local/bin/python /usr/bin/python
如果我尝试sudo pip install stevedore,那么它说已经安装了一些警告:
sudo /usr/local/bin/pip install stevedoreThe directory '/Users/sIDharthnayyar/library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been Disabled. Please check the permissions and owner of that directory. If executing pip with sudo,you may want sudo's -H flag.The directory '/Users/sIDharthnayyar/library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been Disabled. check the permissions and owner of that directory. If executing pip with sudo,you may want sudo's -H flag.Requirement already satisfIEd (use --upgrade to upgrade): stevedore in ./library/Python/2.7/lib/python/site-packagesRequirement already satisfIEd (use --upgrade to upgrade): pbr>=1.6 in /library/Python/2.7/site-packages (from stevedore)Requirement already satisfIEd (use --upgrade to upgrade): six>=1.9.0 in ./library/Python/2.7/lib/python/site-packages (from stevedore)
如果我尝试sudo -H pip install stevedore,那么我会收到以下错误:
sudo -H /usr/local/bin/pip install stevedoreCollecting stevedore Using cached stevedore-1.18.0-py2.py3-none-any.whlRequirement already satisfIEd (use --upgrade to upgrade): pbr>=1.6 in /library/Python/2.7/site-packages (from stevedore)Collecting six>=1.9.0 (from stevedore) Using cached six-1.10.0-py2.py3-none-any.whlInstalling collected packages: six,stevedore Found existing installation: six 1.4.1 DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling six-1.4.1:Exception:Traceback (most recent call last): file "/library/Python/2.7/site-packages/pip/basecommand.py",line 215,in main status = self.run(options,args) file "/library/Python/2.7/site-packages/pip/commands/install.py",line 317,in run prefix=options.prefix_path,file "/library/Python/2.7/site-packages/pip/req/req_set.py",line 736,in install requirement.uninstall(auto_confirm=True) file "/library/Python/2.7/site-packages/pip/req/req_install.py",line 742,in uninstall paths_to_remove.remove(auto_confirm) file "/library/Python/2.7/site-packages/pip/req/req_uninstall.py",line 115,in remove renames(path,new_path) file "/library/Python/2.7/site-packages/pip/utils/__init__.py",line 267,in renames shutil.move(old,new) file "/System/library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",line 302,in move copy2(src,real_dst) file "/System/library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",line 131,in copy2 copystat(src,dst) file "/System/library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",line 103,in copystat os.chflags(dst,st.st_flags)OSError: [Errno 1] Operation not permitted: '/tmp/pip-NOex2K-uninstall/System/library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
如果我创建一个.bash_profile并放入其中:
export WORKON_HOME=$HOME/.virtualenvsexport PROJECT_HOME=$HOME/Develexport VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/pythonexport VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenvsource /usr/local/bin/virtualenvwrapper.sh
并重新加载终端窗口然后我收到以下错误:
source ~/.bash_profileTraceback (most recent call last): file "/library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",in
好奇和curIoUser.
关于出了什么问题以及如何解决这个问题的任何建议?
谢谢
SIDharth最佳答案我也很困惑这个问题.我通过卸载旧的装卸工并重新安装它来解决它.
sudo pip uninstall stevedoresudo pip install stevedore
总结 以上是内存溢出为你收集整理的python – mkvirtualenv ImportError:没有名为stevedore的模块全部内容,希望文章能够帮你解决python – mkvirtualenv ImportError:没有名为stevedore的模块所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)