将Python3传递给virtualenvwrapper会引发ImportError

将Python3传递给virtualenvwrapper会引发ImportError,第1张

概述我正在尝试使用virtualenvwrapper来制作基于 python 3的virtualenv.但是,当我传递可选的解释器参数时,我看到了这个错误.我正在运行Ubuntu 15.04.我尝试重新安装virtualenv和virtualenvwrapper但没有成功.感谢你的帮助! $mkvirtualenv scriptcutter --python=/usr/bin/python3Runn 我正在尝试使用virtualenvwrapper来制作基于 python 3的virtualenv.但是,当我传递可选的解释器参数时,我看到了这个错误.我正在运行Ubuntu 15.04.我尝试重新安装virtualenv和virtualenvwrapper但没有成功.感谢你的帮助!
$mkvirtualenv scriptcutter --python=/usr/bin/python3Running virtualenv with interpreter /usr/bin/python3Traceback (most recent call last):  file "/usr/local/lib/python2.7/dist-packages/virtualenv.py",line 8,in <module>    import base64  file "/usr/lib/python3.4/base64.py",line 9,in <module>    import re  file "/usr/lib/python3.4/re.py",line 336,in <module>    import copyreg  file "/usr/local/lib/python2.7/dist-packages/copyreg/__init__.py",line 7,in <module>    raise importError('This package should not be accessible on Python 3. 'importError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.Error in sys.excepthook:Traceback (most recent call last):  file "/usr/lib/python3/dist-packages/apport_python_hook.py",line 53,in apport_excepthook    if not enabled():  file "/usr/lib/python3/dist-packages/apport_python_hook.py",line 24,in enabled    import re  file "/usr/lib/python3.4/re.py",in <module>    raise importError('This package should not be accessible on Python 3. 'importError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.Original exception was:Traceback (most recent call last):  file "/usr/local/lib/python2.7/dist-packages/virtualenv.py",in <module>    raise importError('This package should not be accessible on Python 3. 'importError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
解决方法 我遇到了同样的问题,但在我将virtualenv降级到12.0.2之后,这个问题就消失了. 总结

以上是内存溢出为你收集整理的将Python3传递给virtualenvwrapper会引发ImportError全部内容,希望文章能够帮你解决将Python3传递给virtualenvwrapper会引发ImportError所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1206582.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-04
下一篇 2022-06-04

发表评论

登录后才能评论

评论列表(0条)

保存