升级cvxpy使用pip3失败

时间:2016-01-13 22:10:59

标签: python pip cvxpy

使用pip3升级cvxpy时出现此错误。有人知道如何解决这个问题吗?谢谢。该平台是OS X 10.11.2。

Collecting cvxpy
  Using cached cvxpy-0.3.5.tar.gz
Requirement already satisfied (use --upgrade to upgrade): cvxopt>=1.1.6 in /usr/local/lib/python3.5/site-packages (from cvxpy)
Requirement already satisfied (use --upgrade to upgrade): ecos>=2 in /usr/local/lib/python3.5/site-packages (from cvxpy)
Requirement already satisfied (use --upgrade to upgrade): scs>=1.1.3 in /usr/local/lib/python3.5/site-packages (from cvxpy)
Collecting multiprocess (from cvxpy)
  Using cached multiprocess-0.70.3.tgz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/94/v_wjnx7x62n8x7dfr_734zy80000gn/T/pip-build-bwub59jx/multiprocess/setup.py", line 66, in <module>
        meta_fh = open(os.path.join(here, '%s/__init__.py' % libdir))
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/94/v_wjnx7x62n8x7dfr_734zy80000gn/T/pip-build-bwub59jx/multiprocess/py3.5/multiprocess/__init__.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/94/v_wjnx7x62n8x7dfr_734zy80000gn/T/pip-build-bwub59jx/multiprocess

1 个答案:

答案 0 :(得分:1)

您是否使用Python 3.5?

如果是这样,似乎对multiprocess的依赖关系尚未更新为python 3.5。但是3.4的安装脚本对我有用:

  1. 转到https://pypi.python.org/pypi/multiprocess并下载0.70.3.tgz文件(页面底部)
  2. tar -xvzf multiprocess-0.70.3.tgz
  3. cd multiprocess-0.70.3然后mv py3.4 py3.5
  4. python3 setup.py build
  5. python3 setup.py install
  6. pip3 install cvxpy
  7. pip3 install nose
  8. nosetests cvxpy现在应该可行了。