无法在Windows上安装scikit-bio [英] Trouble installing scikit-bio on Windows
问题描述
当尝试在Windows XP上使用Python 2.78和Visual C ++ 2008 Express Edition通过pip安装scikit-bio工具箱时,该过程会中断,并显示VC发出的以下消息:
When attempting to install the scikit-bio toolkit via pip on Windows XP using Python 2.78 and Visual C++ 2008 Express Edition, the process is interrupted with the following message issued by VC:
cl : Command line error D8021 : invalid numeric argument '/Wno-error=declaration
-after-statement'
关于此错误,Microsoft Developer Network网站只是说:
Concerning this error, Microsoft Developer Network website just says:
invalid numeric argument 'number'
A number greater than 65,534 was specified as a numeric argument.
我还没有尝试在Linux(Ubuntu 12.04 Precise)下安装scikit-bio,但是我印象中它可以正常工作(因为一切都取决于Linux).
I did not (yet) attempted to install scikit-bio under Linux (Ubuntu 12.04 Precise), but I am under the impression that it will work fine (as everything goes as regards Linux).
有没有人成功在Windows(XP,7、8)下安装scikit-bio?有提示吗?
Has anyone ever succeeded installing scikit-bio under Windows (XP, 7, 8)? Any hints?
提前谢谢!
推荐答案
我已在Windows 10计算机上安装了Anaconda的Python(3.5).如您所知,此平台尚无scikit-bio的正式版本,但您可以使用以下解决方法进行安装:
I've installed Anaconda's Python (3.5) on a Windows 10 machine. As you should know, there is no official version of scikit-bio for this platform, but you can install it with this workaround:
- 从 Scikit-bio Github存储库下载最新资源.
- 使用 7-zip 之类的工具,将其解压缩到您的主目录中.
-
打开命令行客户端,然后切换到源的目录
- Download the latest source from the Scikit-bio Github repository.
- Using a tool like 7-zip, unzip it at your home directory.
Open a command line client and change to the source's directory
cd %HOMEPATH%\scikit-bio-master
使用 Notepad ++ 编辑文件 setup.py
Using Notepad++ edit the file setup.py
"C:\Program Files (x86)\Notepad++\notepad++" setup.py
查找定义 ssw_extra_compile_args 变量的行并进行更改.您可以注释以前的版本,并在新行中重新定义变量:
Look for the line where the ssw_extra_compile_args variable is defined and change it. You can comment the previous version and redefine the variable in a new line:
#ssw_extra_compile_args = ['-Wno-error=declaration-after-statement']
ssw_extra_compile_args = []
保存更改,关闭编辑器并使用以下命令运行安装:
Save the changes, close the editor and run the installation with this command:
python setup.py install
希望您不会收到任何错误消息.打开Anaconda的Python会话(使用命令python
),并测试是否使用print(skbio.art)
正确安装了Scikit-Bio.
Hopefully you won't receive any error messages. Open an Anaconda's Python session (using the command python
) and test if Scikit-Bio was installed rightly using print(skbio.art)
.
顺便说一句,我以前安装了启用了C ++ SDK功能的Visual Studio 2015 Community Edition,以满足软件包(Scikit-Bio)安装的编译器要求.
By the way, I've previously installed Visual Studio 2015 Community Edition with C++ SDK features enabled, in order to meet the compiler requirements for the package (Scikit-Bio) installation.
这篇关于无法在Windows上安装scikit-bio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!