【问题标题】:Main library(scipy) not getting inherited in virtual env主库(scipy)没有在虚拟环境中被继承
【发布时间】:2014-05-22 19:51:14
【问题描述】:

我一直在尝试将我通常在 Python 中使用的库安装到新笔记本电脑上。我正在使用 mac OS 版本 10.9.3 和 Python 2.7。

我安装了 Xcode,Homebrew。不知何故,Homebrew 从一开始就显示错误。一般我安装 ruby​​ -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 。这功力。但是找到了一个替代方案,现在我安装了 gcc。我在我的 usr/local/bin 中安装了 gcc 和 gfortan..这意味着我已经为 scipy 安装了 gcc fortan。

**Python 2.7.5 (default, Mar  9 2014, 22:15:05) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> importscipy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'importscipy' is not defined
>>> import scipy
>>> exit()
datlma:~ mkamalakshan$ cd Documents/DataScience/Projects/
datlma:Projects m$ workon Test
(Test)datlmeenuka:Projects mkamalakshan$ python
Python 2.7.5 (default, Mar  9 2014, 22:15:05) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import scipy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named scipy**
>>> exit()
(Test)datlmeenuka:Projects mkamalakshan$ pip freeze
numpy==1.8.1
wsgiref==0.1.2
(Test)datlmeenuka:Projects mkamalakshan$ pip install scipy
Downloading/unpacking scipy
  Downloading scipy-0.14.0.tar.gz (10.2MB): 10.2MB downloaded
  Running setup.py (path:/Users/mkamalakshan/.virtualenvs/Test/build/scipy/setup.py)        
 .
 .
 .
 .
 .
 .
 .
 customize PGroupFCompiler
Could not locate executable pgfortran
don't know how to compile Fortran code on platform 'posix'
building 'dfftpack' library
error: library dfftpack has Fortran sources but no Fortran compiler found

你们能告诉我我做错了什么吗?可能是我忽略了一些东西。或者可能有其他解决方法。

干杯 菜单

【问题讨论】:

    标签: python gcc scipy virtualenv homebrew


    【解决方案1】:

    我找到的唯一解决方案是安装 macport 并重新开始。它确实是一个临时解决方案。但我没有尝试 virtualenvs 。但是使用 macport 我有我想使用的所有科学软件包。

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-12
      • 1970-01-01
      • 2019-09-24
      • 1970-01-01
      • 2016-10-26
      • 2013-08-24
      相关资源
      最近更新 更多