未在virtualenv中编译/构建的Numpy和matplotlib
我正试图和numpy建立virtualenv。我发现推荐的方法是使用 python setup.py安装 在虚拟环境下的numpy目录中 我想知道是否有可能避免fortran编译,而只使用可用于操作系统的numpy二进制文件 有人试过这个吗?我不知道numpy在哪里 更新: 设法做了些什么。 在我的文件系统中搜索“numpy”,并在“usr/lib/pymodules/python2.7/numpy”中找到它 然后我把它复制到我的virtualenv文件夹“lib/pymodules/python2.7” 现在,我可以调用我尝试过的所有numpy方法 更新: 试图安装matplotlib,因为numpy是matplotlib的依赖项。但失败了:未在virtualenv中编译/构建的Numpy和matplotlib,numpy,matplotlib,virtualenv,Numpy,Matplotlib,Virtualenv,我正试图和numpy建立virtualenv。我发现推荐的方法是使用 python setup.py安装 在虚拟环境下的numpy目录中 我想知道是否有可能避免fortran编译,而只使用可用于操作系统的numpy二进制文件 有人试过这个吗?我不知道numpy在哪里 更新: 设法做了些什么。 在我的文件系统中搜索“numpy”,并在“usr/lib/pymodules/python2.7/numpy”中找到它 然后我把它复制到我的virtualenv文件夹“lib/pymodules/pytho
REQUIRED DEPENDENCIES
numpy: 1.5.1
freetype2: found, but unknown version (no pkg-config)
* WARNING: Could not find 'freetype2' headers in any
* of '/usr/include', '.', '/usr/include/freetype2',
* './freetype2'.
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo']
warning: no files found matching 'KNOWN_BUGS'
warning: no files found matching 'INTERACTIVE'
warning: no files found matching 'MANIFEST'
warning: no files found matching '__init__.py'
warning: no files found matching 'examples/data/*'
warning: no files found matching 'lib/mpl_toolkits'
warning: no files found matching 'LICENSE*' under directory 'license'
In file included from ./CXX/Extensions.hxx:37:0,
from src/ft2font.h:6,
from src/ft2font.cpp:3:
./CXX/WrapPython.h:58:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
看起来确实不是numpy导致了这些错误。正在尝试诊断错误的原因
更新:
手动检查所有必需的依赖项并安装它们。
它飞得太快了,所以我没有注意到它,并且相信它没有产生任何错误。不确定您使用的是什么操作系统,但我只会使用二进制文件。当然,你会得到SciPy和其他一些东西,但是它会尽可能地省事。不确定你在使用什么操作系统,但我会使用二进制文件。当然,您可以获得SciPy和其他一些东西,但它可以让您尽可能轻松地使用。您可能需要python开发包。试试这个
sudo apt-get install python2.7-dev
可能您需要python开发包。试试这个
sudo apt-get install python2.7-dev
您还可以查看About和EPD together.Tnx的重播。我会尝试一下,但目前我只需要在没有必要的fortran编译器的机器上使用virtualenv中的numpy。如果发现类似问题,我会尝试一下。您还可以查看About和EPD together.Tnx的重播。我会尝试一下,但目前我只需要在没有必要的fortran编译器的机器上使用virtualenv中的numpy。如果发现类似问题,我会尝试一下。没有,检查过了,已经安装好了。这似乎是缺少gcc的依赖项。@Alan如果出现此错误
致命错误:Python.h:没有终止此类文件或目录编译。
,意味着gcc无法找到Python.h,这不太可能是gcc的问题,也表明gcc正在尝试编译(使用源文件)但找不到特定的头文件。对我来说,必须执行dosudo apt get install python3.2-dev libpng12 dev libfreetype6 dev
Nope,选中并安装它。这似乎是缺少gcc的依赖项。@Alan如果出现此错误致命错误:Python.h:没有终止此类文件或目录编译。
,意味着gcc无法找到Python.h,这不太可能是gcc的问题,也表明gcc正在尝试编译(使用源文件)但找不到特定的头文件。对我来说,必须执行dosudo apt get install python3.2-dev libpng12 dev libfreetype6 dev