pip install pipenv:python setup.py egg_info" failed with error code 1

在Linux下使用pip安装pipenv时发现如下错误:

    Complete output from command python setup.py egg_info:
    error in pipenv setup command: 'install_requires' must be a string or list of strings contai
ning valid project/version requirement specifiers    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-AUWqpD/pipenv/

最后发现是setuptools的版本太老,需要更新setuptools
更新setuptools:

root@master my_project]# pip install --upgrade setuptools
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/7f/e1/820d941153923aac1d49d7fc37e17b6e73bfbd2904959
fffbad77900cf92/setuptools-39.2.0-py2.py3-none-any.whl (567kB)    100% |████████████████████████████████| 573kB 128kB/s 
Installing collected packages: setuptools
  Found existing installation: setuptools 0.9.8
    Uninstalling setuptools-0.9.8:
      Successfully uninstalled setuptools-0.9.8
Successfully installed setuptools-39.2.0

安装pipenv:

root@master my_project]# pip install pipenv
Collecting pipenv
  Using cached https://files.pythonhosted.org/packages/7e/01/3faf5d7e80c8c0612667b12104ae205a5e33d502f84b
6e8bfdc07a2eb9fa/pipenv-2018.5.18.tar.gzRequirement already satisfied: pip>=9.0.1 in /usr/lib/python2.7/site-packages (from pipenv) (10.0.1)
Collecting certifi (from pipenv)
  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea73
72340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)    100% |████████████████████████████████| 153kB 335kB/s 
Requirement already satisfied: setuptools>=36.2.1 in /usr/lib/python2.7/site-packages (from pipenv) (39.2
.0)Collecting virtualenv-clone>=0.2.5 (from pipenv)
  Downloading https://files.pythonhosted.org/packages/6d/c2/dccb5ccf599e0c5d1eea6acbd058af7a71384f9740179
db67a9182a24798/virtualenv_clone-0.3.0-py2.py3-none-any.whlCollecting virtualenv (from pipenv)
  Downloading https://files.pythonhosted.org/packages/b6/30/96a02b2287098b23b875bc8c2f58071c35d2efe84f747
b64d523721dc2b5/virtualenv-16.0.0-py2.py3-none-any.whl (1.9MB)    100% |████████████████████████████████| 1.9MB 148kB/s 
Installing collected packages: certifi, virtualenv-clone, virtualenv, pipenv
  Running setup.py install for pipenv ... done
Successfully installed certifi-2018.4.16 pipenv-2018.5.18 virtualenv-16.0.0 virtualenv-clone-0.3.0
You have new mail in /var/spool/mail/root

你可能感兴趣的:(解决问题)