代码之家  ›  专栏  ›  技术社区  ›  ButterJones

为什么我不能安装pyenv?

  •  4
  • ButterJones  · 技术社区  · 7 年前

    问题:

    pip install pyenv
    

    我得到如下所示的错误。

    错误消息:

    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\
    
    1 回复  |  直到 7 年前
        1
  •  2
  •   Pierre de Buyl    7 年前

    “pypi” page of pyvenv

    PyPi支持尚未被许多用户测试,因此

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