问题:
我在Windows 10计算机上使用python 2.7。
当我跑步时
pip install pyenv
我收到如下错误。
这是我遇到的唯一一个无法成功安装的pip模块。我不确定为什么会这样。有什么想法吗?
错误消息:
pip install pyenv
Collecting pyenv
Downloading pyenv-20150113.1.tar.gz
Building wheels for collected packages: pyenv
Running setup.py bdist_wheel for pyenv: started
Running setup.py bdist_wheel for pyenv: finished with status 'error'
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\u sers\\user\\appdata\\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', open )(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_w heel -d c:\users\user\appdata\local\temp\tmprb9n7epip-wheel- --python-tag cp27:
running bdist_wheel
running build
installing to build\bdist.win32\wheel
running install
Cloning into 'C:/Users/user/.pyenv'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-doctor'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-installer'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-pip-rehash'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-update'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-virtualenv'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-which-ext'...
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to your profile:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\user\appdata\local\temp\pip-build-_6j2tq\pyenv\setup.py", line 33, in <module>
cmdclass=dict(install=PyenvInstall),
File "c:\python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\python27\lib\site-packages\wheel\bdist_wheel.py", line 257, in run
self.distinfo_dir)
File "c:\python27\lib\site-packages\wheel\bdist_wheel.py", line 393, in egg2dist
raise ValueError(err)
ValueError: Egg metadata expected at build\bdist.win32\wheel\.\pyenv-20150113.1-py2.7.egg-info but not found
----------------------------------------
Failed building wheel for pyenv
Running setup.py clean for pyenv
Failed to build pyenv
Installing collected packages: pyenv
Running setup.py install for pyenv: started
Running setup.py install for pyenv: finished with status 'error'
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\ \users\\user\\appdata\\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', op en)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" insta ll --record c:\users\user\appdata\local\temp\pip-wjwco5-record\install-record.txt --single-version-ex ternally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata \\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.rea d().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\mse dmon\appdata\local\temp\pip-wjwco5-record\install-record.txt --single-version-externally-managed --compi le" failed with error code 1 in c:\users\user\appdata\local\temp\pip-build-_6j2tq\pyenv\
答案 0 :(得分:1)
“pypi”page of pyvenv提及:
PyPi支持还没有被很多用户测试过,所以直接的方式 如果你想安全地使用它,仍然建议使用。
该软件包的作者建议使用他们专用的installation script。