我试图安装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) 我已经安装了MSVC++ 2010 Express,而我的vcvarsall.bat文件C:\Program Files\Microsoft Visual Studio 10.0\VC位于我的系统PATH中.当我运行时easy_install,它找不到vcvarsall.bat.
我需要在distutils.cfg文件中设置一些东西来指向我的MSVC++安装吗?
G:\>easy_install hg-git
install_dir C:\Python26\Lib\site-packages\
Searching for hg-git
Best match: hg-git 0.2.6
Processing hg_git-0.2.6-py2.6.egg
hg-git 0.2.6 is already the active version in easy-install.pth
Using c:\python26\lib\site-packages\hg_git-0.2.6-py2.6.egg
Processing dependencies for hg-git
Searching for dulwich>=0.6.0
Reading http://pypi.python.org/simple/dulwich/
Reading http://samba.org/~jelmer/dulwich
Reading http://launchpad.net/dulwich
Best match: dulwich 0.7.1
Downloading http://www.samba.org/~jelmer/dulwich/dulwich-0.7.1.tar.gz
Processing dulwich-0.7.1.tar.gz
Running dulwich-0.7.1\setup.py -q bdist_egg --dist-dir c:\docume~1\mlin\locals~1
\temp\easy_install-fhraep\dulwich-0.7.1\egg-dist-tmp-qozily
error: Setup script exited with error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud) 我已经安装了Microsoft Visual Studio 2008.我下载了用于Windows扩展的zip文件Python,并将内容解压缩到我的Python27文件夹中.现在有一个名为pywin32-214的子文件夹.(32部分是一个问题吗?我在64位系统上.)这是命令行的成绩单:
C:\Python27\pywin32-214>setup.py -q install
Building pywin32 2.7.214.0
Traceback (most recent call last):
File "C:\Python27\pywin32-214\setup.py", line 2152, in <module>
('', ('pywin32.pth',)),
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\pywin32-214\setup.py", line 1251, in run
install.run(self)
File "C:\Python27\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\pywin32-214\setup.py", line 596, …Run Code Online (Sandbox Code Playgroud) 我一直在尝试在我的Window 7系统上安装Cython for Python 2.7.特别是,我更喜欢64位的所有内容.(如果你想知道,我需要Cython,因为Cython是我需要另一个软件包进行专门的数值分析所需的组件之一.而x64可能是存储大型数据集的一个优势.)
所以我从官方网站下载了x64 Python 2.7.来自Christoph Gohlke的Cython.当然,Python 2.7的amd64版本.在我安装之前,我将Python 2.7添加到注册表中,其中.reg包含Joe DF的答案中的文件.之后,我从这里安装了Visual C++编译器(我认为它不起作用)和这里(但是应该这样).在这一点上,我有我的C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin目录中所有的vcvars32.bat,vcvars64.bat,vcvars86_amd64.bat,vcvarsx86_ia64.bat.我跑了vcvars64.bat,没有错误信息.
随后,我按照此页面创建了一个"hello world"测试文件.
然后,我收到了这个错误.
...\Tests>python setup.py build_ext --inplace
running build_ext
building 'hello' extension
error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud)
所以我心想:嗯,Cython找不到那个文件,因为它不存在.(我搜索我的整个它的硬盘.)所以我复制vcvars64.bat从...\VC\bin到\VC,改变了名称vcvarsall.bat.现在vcvarsall错误消失了.而且......自然会出现一个新的错误.
...\Tests>python setup.py build_ext --inplace
running build_ext
building 'hello' extension
C:\Program Files (x86)\Microsoft …Run Code Online (Sandbox Code Playgroud) 我在Windows 7 x64笔记本电脑上安装了Visual Studio 2008并安装了Service Pack 1.
现在我想将x64平台添加到我的C++解决方案中.但是我的项目的配置管理器中没有可用的x64平台.我确定在Visual Studio安装过程中手动选择了x64支持并且已安装.
我的设置有什么问题?
请对我温柔点。我已经搜索过该网站,我知道这个确切问题还有另一个答案,但是发布在那里的答案对我不起作用。
我正在尝试安装pycrypto,以便我可以开始paramiko工作。 Paramiko由于缺少pycrypto模块而失败。我试过使用pip install pycryptowhich 成功,但没有解决问题。
我试过安装二进制版本pycrypto,但没有解决问题。
现在我正在尝试构建pycrypto. 我有cygwin64并mingw安装在我的机器上。最远的方法是
python setup.py build --compiler=mingw32
Run Code Online (Sandbox Code Playgroud)
这会出错,
checking whether we are cross compiling... configure: error: in `/cygdrive/c/Python27/pycrypto-2.6.1':
configure: error: cannot run C compiled programs.
Run Code Online (Sandbox Code Playgroud)
另一个答案建议删除路径中的空格。我曾尝试将路径简化为简单
c:\mingw;c:\python2.7;c:\cygwin64\bin
Run Code Online (Sandbox Code Playgroud)
结果没有改变?
有没有人可以指点我的解决方法?谢谢你。总体目标是开始paramiko工作。该paramiko错误是
ImportError: No module named Crypto.PublicKey
Run Code Online (Sandbox Code Playgroud) 手动或使用 pip 安装 pyethash 时,出现同样的错误:
致命错误 C1083:无法打开包含文件:“alloca.h”:没有此类文件或目录错误:命令“C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe”失败退出状态2
python 2.7.11(v2.7.11:6d1b6a68f775,2015 年 12 月 5 日,20:40:30)[MSC v.1500 64 位(AMD64)],Windows 8.1 x64
PS C:\pyethereum\ethash-master> python setup.py install
running install
running build
running build_ext
building 'pyethash' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe …Run Code Online (Sandbox Code Playgroud)