在Windows 8,python 3.3中创建虚拟环境的麻烦
发布时间:2020-12-14 04:15:20 所属栏目:Windows 来源:网络整理
导读:我正在尝试用 Python创建一个虚拟环境,但无论我重新安装python-setuptools和pip多少次,我总是会收到错误. 我的电脑运行的是Windows 8,而我正在使用Python 3.3. E:Documentsprojvirtualenv venv --distributeUsing base prefix 'c:Python33'New python ex
我正在尝试用
Python创建一个虚拟环境,但无论我重新安装python-setuptools和pip多少次,我总是会收到错误.
我的电脑运行的是Windows 8,而我正在使用Python 3.3. E:Documentsproj>virtualenv venv --distribute Using base prefix 'c:Python33' New python executable in venvScriptspython.exe Installing setuptools,pip... Complete output from command E:DocumentsprojvenvScriptspython.exe -c "imp ort sys,pip; pip...ll"] + sys.argv[1:])" setuptools pip: Traceback (most recent call last): File "<string>",line 1,in <module> File "<frozen importlib._bootstrap>",line 1567,in _find_and_load File "<frozen importlib._bootstrap>",line 1534,in _find_and_load_unlocked File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtpip-1.5-py2.py3-none-any.whlpip__init__.py",line 9,in _find_and_load_unlocked File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtpip-1.5-py2.py3-none-any.whlpiplog.py",line 8,in _find_and_load_unlocked File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtsetuptools-2.0.2-py2.py3-none-any.whlpkg_resources.py",line 2696,in <modul e> File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtsetuptools-2.0.2-py2.py3-none-any.whlpkg_resources.py",line 429,in __init_ _ File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtsetuptools-2.0.2-py2.py3-none-any.whlpkg_resources.py",line 443,in add_ent ry File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtsetuptools-2.0.2-py2.py3-none-any.whlpkg_resources.py",line 1722,in find_i n_zip File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtsetuptools-2.0.2-py2.py3-none-any.whlpkg_resources.py",line 1298,in has_me tadata File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtsetuptools-2.0.2-py2.py3-none-any.whlpkg_resources.py",line 1614,in _has File "c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv_suppo rtsetuptools-2.0.2-py2.py3-none-any.whlpkg_resources.py",line 1488,in _zipin fo_name AssertionError: c:Python33libsite-packagesvirtualenv-1.11-py3.3.eggEGG-INFO PKG-INFO is not a subpath of c:Python33libsite-packagesvirtualenv-1.11-py3. 3.eggvirtualenv_supportsetuptools-2.0.2-py2.py3-none-any.whl ---------------------------------------- ...Installing setuptools,pip...done. Traceback (most recent call last): File "C:Python33Scriptsvirtualenv-script.py",in <module> load_entry_point('virtualenv==1.11','console_scripts','virtualenv')() File "C:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv.py",line 820,in main symlink=options.symlink) File "C:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv.py",line 988,in create_environment install_wheel(to_install,py_executable,search_dirs) File "C:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv.py",line 956,in install_wheel 'PIP_NO_INDEX': '1' File "C:Python33libsite-packagesvirtualenv-1.11-py3.3.eggvirtualenv.py",line 898,in call_subprocess % (cmd_desc,proc.returncode)) OSError: Command E:DocumentsprojvenvScriptspython.exe -c "import sys,pip; pip...ll"] + sys.argv[1:])" setuptools pip failed with error code 1
我找到了解决这个问题的方法.只有几天前发布的最新virtualenv(v1.11)才出现这个问题.从您的site-packages文件夹中删除egg并通过easy_install virtualenv == 1.10.1安装以前的版本,virtualenv将正常工作.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows – 调试可怕的’应用程序无法初始化’错误
- active-directory – Windows 10,RSAT工具缺少功能
- qt4 – Qt – Windows 7基本主题下禁用的QPushButton的样式
- Windows API一日一练 53 CreateFile函数
- Putty动态标题($PWD)
- 安装 – 在没有Windows CD的Windows 2003上安装IIS
- win10系统下安装Ubuntu18.04双系统
- powershell – 在Nano Server上运行Service Fabric
- uwp – 如何使用Universal Windows App中的System.Net.Http
- Windows有免费的MS Exchange客户端吗?