2017-09-18 102 views
0

问题:为什么我不能安装pyenv?

我在我的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

的 “PyPI将” page of pyvenv提到:

的PyPI将支持不是很多用户进行过测试,所以直接的方式 IST仍然建议,如果你想玩它安全。

该软件包的作者建议使用他们专用的installation script

+0

我会试试看。感谢您的反馈。 – ButterJones

相关问题