我试图安装Python包dulwich:
pip install dulwich
Run Code Online (Sandbox Code Playgroud)
但我得到一个神秘的错误信息:
error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud)
如果我尝试手动安装包,也会发生同样的情况:
> python setup.py install
running build_ext
building 'dulwich._objects' extension
error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud) Virtualenv非常棒:它让我可以保留许多不同的Python安装,这样不同项目的依赖关系就不会全部集中在一起.
但是,如果我想在Windows上安装一个打包为.exe安装程序的软件包,我如何指导它安装到virtualenv?例如,我有pycuda-0.94rc.win32-py2.6.exe.当我运行它时,它会检查注册表,并且只找到一个要安装的Python26,这是我的virtualenv所基于的常见的.
如何指导它安装到virtualenv?
我正在使用Vista,并使用Python 2.6.4.我正在使用一个使用Python脚本的软件,但碰到了这个消息:
cannot find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud)
所以,我安装了visual c ++ 2010.仍然找不到文件 - 但是,它就在那里.我的猜测(一个非常没有受过教育的人......)是路径错误的地方,因为我还有一个旧的视觉2008(非常空)文件夹.我不知道在哪里对新路径进行更改.我是否在注册表或脚本中更改了某些内容?或者别的地方?
我尝试使用32位安装Scrapy for Python 2.7.8(anaconda 2.1.0)
pip install scrapy
Run Code Online (Sandbox Code Playgroud)
我收到了这个错误
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
Run Code Online (Sandbox Code Playgroud)
我已经按照这些stackover流程问题中找到的解决方案.没有任何效果.
用于Python 2.7的Microsoft Visual C++编译器
在windows7 64bit上运行"pip install numpy"时出现"错误:无法找到vcvarsall.bat"
pip install给出错误:无法找到vcvarsall.bat
如何将easy_install指向vcvarsall.bat?
pip install MySQL-python返回无法找到vcvarsall.bat
这是错误,上面和下面有几行:
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt
-> build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution opt
ion: 'bugtrack_url'
warnings.warn(msg)
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
----------------------------------------
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:
\\Users\\San\\AppData\\Local\\Temp\\pip-build-wp6ei6r9\\lxml\\setup.py';exec(com
pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f
ile__, …Run Code Online (Sandbox Code Playgroud) 使用pip install zipline在Windows 8上使用Python 2.7给我的错误:
Downloading/unpacking six (from python-dateutil==2.1->delorean->zipline[all])
Running setup.py egg_info for package six
Installing collected packages: blist, pytz, requests, python-dateutil, six
Running setup.py install for blist
building '_blist' extension
error: Unable to find vcvarsall.bat
Complete output from command C:\Python27\python.exe -c "import setuptools;__
file__='c:\\users\\ThatsMe\\appdata\\local\\temp\\pip-build-ThatsMe\\blist\\setup.py';ex
ec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" inst
all --record c:\users\ThatsMe\appdata\local\temp\pip-xvoky2-record\install-record.tx
t --single-version-externally-managed:
running install
running build
running build_py
running build_ext
building '_blist' extension
error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud)
问题:如何解决错误?跑步pip install zipline[all]给出了同样的错误......
我正在尝试在Windows 64位机器上为Python 2.7构建lxml.我找不到Python 2.7版本的lxml egg.所以我从源头编译它.我正在按照本网站上的说明操作
在静态链接部分下.我收到了错误
C:\Documents and Settings\Administrator\Desktop\lxmlpackage\lxml-2.2.6\lxml-2.2.
6>python setup.py bdist_wininst --static
Building lxml version 2.2.6.
NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' need
s to be available.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
Building against libxml2/libxslt in one of the following directories:
..\libxml2-2.7.6--win32--w2k--x64\lib
..\libxslt-1.1.26--win32--w2k--x64--0002\lib
..\zlib-1.2.4--win32--w2k--x64
..\iconv-1.9.1--win32--w2k--x64-0001\lib
running bdist_wininst …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装/编译ctools for python 时获取以下错误(版本信息)
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:22:14) [MSC v.1500 64 bit (AMD64)] on win32
Run Code Online (Sandbox Code Playgroud)
错误:
building 'deap.cTools' extension
Traceback (most recent call last):
File "setup.py", line 40, in <module>
cmdclass = {'build_py': build_py}
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\install.py", …Run Code Online (Sandbox Code Playgroud) 我刚刚在Windows上安装了PyPy,并且在我运行的一些模拟代码中看到了大约10倍的速度提升.我也希望看到使用numpy的代码类似.我不是一个经验丰富的Python程序员,但我发现很难遵循这些说明.有没有人知道如果在Windows上为PyPy安装numpy是可能的,如果是这样,最简单的方法是什么?
说明提供了两个选项.
选项1
如果你有pip(命令行假定它找到属于PyPy的pip,而不是CPython中的pip):
pip install git+https://bitbucket.org/pypy/numpy.git
Run Code Online (Sandbox Code Playgroud)
这似乎是一个很好的选择,但我pip在目录结构中找不到我解压缩.
选项2
或者,直接的方式:
git clone https://bitbucket.org/pypy/numpy.git
cd numpy
pypy setup.py install
Run Code Online (Sandbox Code Playgroud)
我没有登录gitWindows,但我也怀疑这个选项可能涉及从Windows编译源代码https://bitbucket.org/pypy/numpy.git,甚至可能无法(或需要大量黑客攻击).
编辑
通过安装PIP https://sites.google.com/site/pydatalog/python/pip-for-windows按照下面的答案,或在说明这个答案的问题,我如何在Windows上安装PIP?,失败了ConnectionError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /packages/py2.py3/p/pip/pip-1.5.4-py2.py3-none-any.whl (Caused by <class 'httplib.BadStatusLine'>: '').例如,参见此错误报告.不过,我是能够通过微软的Visual Studio安装PIP PTVS通过右键单击在Solution Explorer中的Python环境PyPy 2.7,选择安装Python包.这无法安装numpy(另一个连接错误),但确实安装了pip.
现在我有了pip,我尝试使用命令行安装numpy pip install git+https://bitbucket.org/pypy/numpy.git.首先我需要安装git才能做到这一点......没问题.但随后它失败了以下
building library "npymath" sources
No module named numpy.distutils.msvccompiler in numpy.distutils; …Run Code Online (Sandbox Code Playgroud) 我正在尝试按照本教程并在执行以下操作时出错:
(DataVizProject) $ pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)
它给了我一个很大的错误日志,最后几行是:
C:\python\new-coder\dataviz\DataVizProj\build\numpy\numpy\distutils\system_info.
py:1422: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
warnings.warn(LapackSrcNotFoundError.__doc__)
error: Unable to find vcvarsall.bat
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in C:\python\new-coder
\dataviz\DataVizProj\build\numpy
Run Code Online (Sandbox Code Playgroud)
我知道它不起作用,因为当我执行以下步骤时:
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named …Run Code Online (Sandbox Code Playgroud)