如何安装PyGSL? (Windows 7,64位,Python 2.7,GSL 1.15) [英] How to install PyGSL? (Windows 7, 64 bit, Python 2.7, GSL 1.15)

查看:412
本文介绍了如何安装PyGSL? (Windows 7,64位,Python 2.7,GSL 1.15)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的电脑上安装PyGSL(64位Windows 7),并安装了Python 2.7和GSL 1.15。我几乎陷入困境,我会喜欢一些额外的帮助。 GSL安装得很好,但它的包装是这个问题。出于某种原因,我无法构建pygsl。显然gcc是问题(在另一台Windows机器上遇到同样的问题)。或者可能是pygsl似乎在使用名为AMD64的文件,而我的电脑是x86。我很想用pygsl的windows二进制文件,但它只存在于Python 2.5中,而我的项目需要2.6或更高版本。我已经使用了GSL的windows二进制文件,并且从源代码构建了它,但是我也遇到了同样的问题。我试图从GSL将dll复制到pygsl中,但没有奏效。有些论坛提到了一个名为gsl.dll的文件,但我似乎无法找到它。我也尝试使用Cygwin并用minGW32进行编译无济于事。



cmds我跑了:

  python setup.py install 
python setup.py build
python setup.py build_ext -i
python setup.py build --compiler = mingw32

任何想法?感谢。

欢呼声,
Bereket



在Cygwin中和在Windows cmd中一样提示。错误消息:

  $ /cygdrive/c/Python27/python.exe setup.py build_ext -i 
numpy
强制DISTUTILS_USE_SDK = 1
构建测试ufuncs!
运行build_ext
编译'errno'扩展名
C编译器:gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall -Wstrict-prototypes

编译选项:'-DSWIG_COBJECT_TYPES = 1 -DGSL_RANGE_CHECK = 1 -DDEBUG = 1 -DNUMERIC = 0 -DPYGSL_GSL_MAJOR_VERSION = 1 -DPYGSL_GSL_MINOR_VERSION = 15 -UNDEBUG -IC:\ Users \ Bereket \gsl-1.15\include -IInclude -I 。 -IC:\Python27\lib\site-packages\\\
umpy\core\include -IC:\\Python27\include -IC:\\Python27\PC -c'
gcc - g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall -Wstrict-prototypes -DSWIG_COBJECT_TYPES = 1 -DGSL_RANGE_CHECK = 1 -DDEBUG = 1 -DNUMERIC = 0 -DPYGSL_GSL_MAJOR_VERSION = 1 -DPYGSL_GSL_MINOR_VERSION = 15 -UNDEBUG -IC:\Users\\ \\ Bereket \\ 1.gs1-1.15 \\包括-IInclude -I。 -IC:\Python27\lib\site-packages\\\
umpy\core\include -IC:\Python27\include -IC:\Python27\PC -c src / init / errorno.c -o build\temp.win-amd64-2.7\Release\src\init\errorno.o
找到可执行文件C:\cygwin\bin\gcc.exe
gcc -g -mno-cygwin -shared build \temp.win-amd64-2.7\Release\src\init\errorno.o -LC:\ Users \ Bereket \gsl-1.15\lib - LC:\Python27\libs -LC:\Python27\PCbuild\amd64 -lgsl -lgslcblas -lm -lpython27 -lmsvcr90 -o C:\Python27\Lib\pygsl-0.9.5\pygsl \errno.pyd
build \temp.win-amd64-2.7\Release\src\init\errorno.o:在函数`add_errno'中:
/ cygdrive / c / Python27 /Lib/pygsl-0.9.5/src/init/errorno.c:14:未定义引用`__imp__PyInt_FromLong'
/cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno。 c:20:对'__imp__PyDict_SetItemString'的未定义引用
bui ld\temp.win-amd64-2.7\\Release\src\init\errorno.o:在函数`initerrno'中:
/cygdrive/c/Python27/Lib/pygsl-0.9.5/ src / init / errorno.c:37:对'__imp__Py_InitModule4_64'的未定义引用
/cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:40:对__imp__PyModule_GetDict的未定义引用'
collect2:ld返回1退出状态
错误:命令gcc -g -mno-cygwin -shared build\temp.win-amd64-2.7\Release\src\init\ errorno.o -LC:\ Users \ Bereket \gsl-1.15\lib -LC:\Python27\libs -LC:\Python27\PCbuild\amd64 -lgsl -lgslcblas -lm -lpython27 - lmsvcr90 -o C:\Python27\Lib\pygsl-0.9.5\pygsl\errno.pyd失败,退出状态1


解决方案

我很确定我的GSL安装与Cygwin失败/有未解决的依赖关系。我现在试图用Visual Studio 2010安装它。下面是一些很好的网站: $ b

说明

备用方法


I'm trying to install PyGSL on my computer (64 bit Windows 7), with Python 2.7 and GSL 1.15 installed. I'm pretty much stuck and I would love for some extra help. GSL installed fine, but its the wrapper that's the problem. For some reason I can't build pygsl. Apparently gcc is the problem (got the same problem on another windows machine). Or it could be that pygsl appears to be using a file named AMD64 while my computer is x86. I would love to use the windows binary for pygsl, but it only exists for python 2.5, and my project needs 2.6 or higher. I've used both the windows binary for GSL and built it from source, but I get the same problem either way. I tried copying dlls from GSL into pygsl but that didn't work. Some forums mentioned a file called gsl.dll but I can't seem to find it. I've also tried to use Cygwin and to compile with minGW32 to no avail.

cmds I ran:

python setup.py install
python setup.py build
python setup.py build_ext -i
python setup.py build --compiler=mingw32

Any ideas?? Thanks.

Cheers, Bereket

Got the same message in Cygwin as in the windows cmd prompt. Error message:

$ /cygdrive/c/Python27/python.exe setup.py build_ext -i
numpy
Forcing DISTUTILS_USE_SDK=1
Building testing ufuncs!
running build_ext
building 'errno' extension
C compiler: gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall -Wstrict-prototypes

compile options: '-DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=15 -UNDEBUG -IC:\Users\Bereket\gsl-1.15\include -IInclude -I. -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c'
gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall -Wstrict-prototypes -DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=15 -UNDEBUG -IC:\Users\Bereket\gsl-1.15\include -IInclude -I. -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c src/init/errorno.c -o build\temp.win-amd64-2.7\Release\src\init\errorno.o
Found executable C:\cygwin\bin\gcc.exe
gcc -g -mno-cygwin -shared build\temp.win-amd64-2.7\Release\src\init\errorno.o -LC:\Users\Bereket\gsl-1.15\lib -LC:\Python27\libs -LC:\Python27\PCbuild\amd64 -lgsl -lgslcblas -lm -lpython27 -lmsvcr90 -o C:\Python27\Lib\pygsl-0.9.5\pygsl\errno.pyd
build\temp.win-amd64-2.7\Release\src\init\errorno.o: In function `add_errno':
/cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:14: undefined reference to `__imp__PyInt_FromLong'
/cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:20: undefined reference to `__imp__PyDict_SetItemString'
build\temp.win-amd64-2.7\Release\src\init\errorno.o: In function `initerrno':
/cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:37: undefined reference to `__imp__Py_InitModule4_64'
/cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:40: undefined reference to `__imp__PyModule_GetDict'
collect2: ld returned 1 exit status
error: Command "gcc -g -mno-cygwin -shared build\temp.win-amd64-2.7\Release\src\init\errorno.o -LC:\Users\Bereket\gsl-1.15\lib -LC:\Python27\libs -LC:\Python27\PCbuild\amd64 -lgsl -lgslcblas -lm -lpython27 -lmsvcr90 -o C:\Python27\Lib\pygsl-0.9.5\pygsl\errno.pyd" failed with exit status 1

解决方案

I'm pretty sure now that my GSL install with Cygwin failed / had unresolved dependencies. I'm now trying to install it with visual studio 2010. Here are some good sites for doing that:

Instructions

Alt Method

这篇关于如何安装PyGSL? (Windows 7,64位,Python 2.7,GSL 1.15)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆