安装PyMVPA2时出错 [英] Error installing PyMVPA2

查看:143
本文介绍了安装PyMVPA2时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用PyMVPA2 for Python的pip install进行安装时,出现以下错误.我已经安装了其他库,之前没有任何问题.如果有什么可以看一下错误的,我将不胜感激:

I'm getting the following error when I try to install using pip install for PyMVPA2 for Python. I have installed other libraries without any problems before. I would appreciate if anything could take a look at the errors:

C:\Users\usr>pip install pymvpa2
Collecting pymvpa2
Using cached pymvpa2-2.4.2.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
running build_src
build_src
building extension "mvpa2.clfs.libsmlrc.smlrc" sources
building extension "mvpa2.clfs.libsvmc._svmc" sources
creating build
creating build\src.win32-2.7
creating build\src.win32-2.7\mvpa2
creating build\src.win32-2.7\mvpa2\clfs
creating build\src.win32-2.7\mvpa2\clfs\libsvmc
swig.exe++: mvpa2\clfs\libsvmc\svmc.i
swig.exe -python -I3rd\libsvm -c++ -I3rd\libsvm -o build\src.win32- 2.7\mvpa2\clfs\libsvmc\svmc_wrap.cpp -outdir build\src.win32-2.7\mvpa2\clfs\libsvmc mvpa2\clfs\libsvmc\svmc.i
error: command 'swig.exe' failed: No such file or directory

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\usr\appdata\local\temp\pip-build-v_zzkd\pymvpa2\

推荐答案

由于错误,您要么没有安装swig,要么就不在路径上.您显然在Windows上,因此您需要从 swig网站下载swig可执行文件-下载最新的 windows 软件包,然后将其解压缩到现有路径上的目录或新目录中,然后将其添加到您的路径中.当然,最简单的方法是将其解压缩到新目录,然后在该目录中运行pip命令.

As the error states you either don't have swig installed or it is not on your path. You are obviously on Windows so you need to download the swig executable from the swig website - download the latest windows package and either unzip it to a directory on your existing path or to a new directory and add it to your path. Easiest, of course, is to unzip it to a new directory and then run your pip command in that directory.

  • 无论如何,swig是什么? Swig解析用C/C ++编写的代码的接口定义,并可以输出胶水代码"以允许使用Python& 目前共有22种其他编程或脚本语言,用于透明地使用C/C ++代码. Swig是免费的开放源代码,并与开放源代码和商业用途兼容.

  • What is swig anyway? Swig parses the interface definitions of code written in C/C++ and can output 'glue code' to allow code written in Python & a pile, currently 22, of other programming or scripting languages to use the C/C++ code transparently. Swig is free, open source and compatible with both open source and commercial use.

我应该掌握它吗?在大多数情况下,我在python中知道的swig仅在安装或设置阶段被调用,但是由于该设置阶段将在每次已安装或 升级 的使用swig构建的任何软件包,没有理由摆脱它,并且有很多理由将其保留在某个地方您的路径.

Should I keep it to hand? In most cases that I know of in python swig is only invoked during the installation or setup phase but since that setup phase will be used every time that any package built with swig is installed or upgraded there is no reason to get rid of it and quite a lot of reasons to have it somewhere on your path.

这篇关于安装PyMVPA2时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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