当我尝试构建一个包时:
C:\Linter\intlib\PYTHON>python setup.py build
Run Code Online (Sandbox Code Playgroud)
我收到此错误消息:
运行构建
运行build_ext
建立'LinPy'扩展
错误:无法找到vcvarsall.bat
这是我的Python版本:
在win32上的Python 3.4.4(v3.4.4:737efcadf5a6,2015年12月20日,20:20:57)[MSC v.1600 64位(AMD64)]
我正在使用Windows 10 x64.我知道这个线程和其他几十个(像这样,这个和列表继续).所以,我想我几乎尝试了一切,但没有任何作用.似乎所有这些线程已经过时,所以我需要一些新的收据.BTW.我试过这个:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
Run Code Online (Sandbox Code Playgroud)
而这(在Visual Studio 2015 Visual Studio命令提示符中):
set DISTUTILS_USE_SDK=1
Run Code Online (Sandbox Code Playgroud)
我vcvarsall.bat在我的机器上到处寻找,但找不到它.
我调查了这个文件夹C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools,但它不包含任何.bat文件.无论如何,在我所有的操作之后python setup.py build仍然会引发同样的错误.所以,我需要帮助.谢谢!
作为建议在这里,我已成功安装了微软的Visual C ++编译器为Python 2.7编译一些用Cython代码,但是:
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize("module1.pyx"))
Run Code Online (Sandbox Code Playgroud)
仍然产生:
错误:找不到vcvarsall.bat
如何使用Python 2.7编译Cython代码(例如在Windows 7 x64上)?
注意:我已经仔细阅读了以下错误问题:无法找到vcvarsall.bat,但主要答案(包括修改msvc9compiler.py)都无法解决。
所以我知道已经有相当多的文档,但我似乎无法让它工作.我正在向Heroku部署一个Django应用程序,并且我正在尝试将PIL安装到我的virtualenv中(应用程序的主要部分需要用户上传的图像).
我试过了两个
easy_install PIL
Run Code Online (Sandbox Code Playgroud)
和
pip安装PIL
每个人安装结束
error: Unable to find vcvarsall.bat.
Run Code Online (Sandbox Code Playgroud)
如何让PIL进入我的virtualenv?任何人都可以带我走过吗?
谢谢!
我正在尝试安装rpy2包并获得以下错误
C:\python27>easy_install rpy2
Searching for rpy2
Reading http://pypi.python.org/simple/rpy2/
Reading http://rpy.sourceforge.net
Best match: rpy2 2.3.3
Downloading http://pypi.python.org/packages/source/r/rpy2/rpy2-2.3.3.tar.gz#md5=6cd95eb70645577cb53198ef0a32395e
Processing rpy2-2.3.3.tar.gz
Running rpy2-2.3.3\setup.py -q bdist_egg --dist-dir c:\users\chetan~1\appdata\local\temp\easy_install-wfxip9\rpy2-2.3.3\egg-di
st-tmp-rrezfb
"C:\PROGRA~2\R\R-28~1.0\bin\R" CMD config --ldflags
Invalid substring
in string
C:\Python27\lib\site-packages\setuptools\command\easy_install.py:921: RuntimeWarning: tp_compare didn't return -1 or -2 for ex
ception
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
error: Setup script exited with Problem while running `"C:\PROGRA~2\R\R-28~1.0\bin\R" CMD config --ldflags`
Run Code Online (Sandbox Code Playgroud)
当我尝试pip时,这就是我得到的
c:\Python27\Lib\site-packages\django\bin>pip install rpy2
Run Code Online (Sandbox Code Playgroud)
下载/解压缩rpy2运行setup.py egg_info包rpy2
"C:\PROGRA~2\R\R-28~1.0\bin\R" CMD config --ldflags
Invalid substring
in string
Problem while …Run Code Online (Sandbox Code Playgroud) 当我尝试使用IPython.display导入clear_output,display_html,然后我显示错误:

(ImportError:没有名为IPython的模块)
我正在使用Python 2.7.13,并试图从John Conway开始生活游戏.我关注此链接:http://nbviewer.jupyter.org/url/norvig.com/ipython/Life.ipynb
我已经阅读了有关它的其他问题和答案,但任何答案都适用于我.首先,这个错误显示在命令行中,当我尝试在文件中运行此代码时.其次,这个错误直接导致IPython,而不是子模块或类似的东西.
对于可能是一个不好/措辞不佳的问题,我们事先表示歉意,但是我只是涉足编程,对软件包安装等方面的知识非常陌生。
基本上,我试图通过cygwin终端安装pygrib软件包(可从此处下载:https : //github.com/jswhit/pygrib)。
我在Windows 10上运行32位Python 2.7.3。
最初,当我第一次尝试运行“ python seteup.py build”并遵循此处的建议时,我遇到了丢失的vcvarsall.bat错误:错误:无法找到vcvarsall.bat
安装MS Visual Studio程序包后,我已经解决了该错误,并通过以下输出导致了另一个我不理解的错误:
$ python setup.py build
reading from setup.cfg...running build
running build_py
running build_ext
skipping 'pygrib.c' Cython extension (up-to-date)
building 'pygrib' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\Matthew\Anaconda2\lib\site-packages\numpy\core\include -I/usr/local\include -I/usr/local\include -I/usr/local\include/jasper -I/usr/local\include -I/usr\include -I/usr\include -Ig2clib_src -IC:\Users\Matthew\Anaconda2\include -IC:\Users\Matthew\Anaconda2\PC /Tcpygrib.c /Fobuild\temp.win32-2.7\Release\pygrib.obj
pygrib.c
c:\users\matthew\anaconda2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pygrib.c(242) : fatal …Run Code Online (Sandbox Code Playgroud) 试图在win7上安装py-bcrypt.Python是64位.第一个错误无法找到vcvarsall.bat.谷歌搜索了一下,我需要安装mingw.现在安装它
C:\tools\python_modules\py-bcrypt-0.2>python setup.py build -c mingw32
running build
running build_py
running build_ext
building 'bcrypt._bcrypt' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\Python27\include -Ic:\Python27\PC -c bcrypt/bcrypt_python.c -o b
d\temp.win-amd64-2.7\Release\bcrypt\bcrypt_python.o
bcrypt/bcrypt_python.c:29:26: error: expected declaration specifiers or '...' before 'u_int8_t'
bcrypt/bcrypt_python.c:29:38: error: expected declaration specifiers or '...' before 'u_int16_t'
bcrypt/bcrypt_python.c:29:49: error: expected declaration specifiers or '...' before 'u_int8_t'
bcrypt/bcrypt_python.c: In function 'bcrypt_encode_salt':
bcrypt/bcrypt_python.c:56:2: error: too many arguments to function 'encode_salt'
bcrypt/bcrypt_python.c:29:6: note: declared here
error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
不知道接下来该做什么.我想我不会使用bcrypt并尝试别的东西.还有其他建议吗?
系统:Win7 64,Python 3.4,Pycharm 3.0.2,MinGW
每当我尝试在Pycharm中或通过命令行安装软件包时,我都会得到:
running install
running build
running build_py
running build_ext
Traceback (most recent call last):
File "C:\Users\MyAccount\Downloads\scandir-master\scandir-master\setup.py", line 48, in <module> 'Programming Language :: Python :: Implementation :: CPython',
File "C:\Python34\lib\distutils\core.py", line 148, in setup dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command cmd_obj.run()
File "C:\Python34\lib\distutils\command\install.py", line 554, in run self.run_command('build')
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command cmd_obj.run()
File "C:\Python34\lib\distutils\command\build.py", line 126, in run …Run Code Online (Sandbox Code Playgroud) I am trying to install the cryptography module for python yet I keep getting errors and so far I have been able to solve each one as they come including:
However I have ran into an error that no matter how hard …
我需要在 Python Anaconda3-2.5.0-Windows-x86_64 中连接到 Oracle 数据库。通过以下方式安装 cx_Oracle 模块:
conda install -c https://conda.anaconda.org/anaconda cx_oracle
Run Code Online (Sandbox Code Playgroud)
失败并显示以下输出(已修剪):
Hint: the following packages conflict with each other:
- cx_oracle
- python 3.5*
Run Code Online (Sandbox Code Playgroud)
因此,我尝试通过https://pypi.python.org/pypi/cx_Oracle/ 中的“cx_Oracle-5.2.1-11g.win-amd64-py3.5.exe”安装 Python 3.5 软件包,这似乎正在运行(不知何故)。甚至“conda list”命令也会打印行:
cx-oracle 5.2.1 <pip>
Run Code Online (Sandbox Code Playgroud)
但是当我输入import cx_Oracle;Python 时
ImportError: DLL load failed: Uvedený modul nebyl nalezen.
Run Code Online (Sandbox Code Playgroud)
出现。最后一个本地化部分的粗略翻译是“找不到模块”。
如何安装 cx_Oracle 模块?或者有没有其他方法可以连接到Oracle数据库?
python ×9
windows ×4
python-3.4 ×2
anaconda ×1
c ×1
conda ×1
cython ×1
distutils ×1
django ×1
gcc ×1
grib ×1
install ×1
ipython ×1
module ×1
oracle ×1
pip ×1
pycharm ×1
python-2.7 ×1
python-3.x ×1
rpy2 ×1
virtualenv ×1
visual-c++ ×1