2015-12-02 28 views
0

我想安装与python,numpy和scipy的zipline模块都是最新的,因为是点,但我仍然得到关于fortran编译器的这个错误 - 任何帮助将不胜感激!Pip安装Zipline - Fortran编译器的问题

C02PP0M7F8J2:~ bracea$ pip install zipline 
Collecting zipline 
/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. 
    InsecurePlatformWarning 
    Using cached zipline-0.8.3.tar.gz 
    Complete output from command python setup.py egg_info: 
    Collecting numpy==1.9.2 
    /Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. 
     InsecurePlatformWarning 
     Using cached numpy-1.9.2-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl 
    Installing collected packages: numpy 
     Found existing installation: numpy 1.10.1 
     Uninstalling numpy-1.10.1: 
    Exception: 
    Traceback (most recent call last): 
     File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main 
     status = self.run(options, args) 
     File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run 
     root=options.root_path, 
     File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install 
     requirement.uninstall(auto_confirm=True) 
     File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall 
     paths_to_remove.remove(auto_confirm) 
     File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove 
     renames(path, new_path) 
     File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames 
     shutil.move(old, new) 
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move 
     os.unlink(src) 
    OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/numpy-1.10.1.dist-info/DESCRIPTION.rst' 
    Requirement already satisfied (use --upgrade to upgrade): Cython==0.22.1 in /Library/Python/2.7/site-packages 
    Traceback (most recent call last): 
     File "<string>", line 20, in <module> 
     File "/private/var/folders/2n/dj16vyjd5fjc6ppvzwbbhbw4_np44v/T/pip-build-CfLz1b/zipline/setup.py", line 199, in <module> 
     packages=find_packages('.', include=['zipline', 'zipline.*']), 
    TypeError: find_packages() got an unexpected keyword argument 'include' 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/2n/dj16vyjd5fjc6ppvzwbbhbw4_np44v/T/pip-build-CfLz1b/zipline 

回答

0

看起来像一个权限错误给我。 Pip正在尝试更新numpy包。检查以下内容:

Collecting numpy==1.9.2 
/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. 
    InsecurePlatformWarning 
    Using cached numpy-1.9.2-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl 
Installing collected packages: numpy 
    Found existing installation: numpy 1.10.1 
    Uninstalling numpy-1.10.1: 

然后错误:

OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/numpy-1.10.1.dist-info/DESCRIPTION.rst' 

尝试用root权限执行此操作。不过,我会建议你在虚拟环境中安装它,但不要修改系统python。

+0

非常感谢,对我来说工作得很好! –