我遇到了a github project,我正在尝试安装并运行它,但我遇到了一些问题。我还提出了as an issue。那里有整个点子日志。
如果我理解正确,问题似乎围绕着distutils:
f:\ python27 \ Lib \ distutils \ dist.py:267:UserWarning:Unknown 分发选项:'use_2to3'warnings.warn(msg)错误:无法执行 找到vcvarsall.bat
看着这个,我被引导到error: Unable to find vcvarsall.bat。
现在检查我的系统我已经安装了MS Visual C ++ 2005,2008,2010。我没有visual studio。我正在使用win 7和安装了MINGW32的git-bash。在上面的帖子中,fpessoa讨论了setup.py install build --compiler=mingw32
。我决定尝试以下方法:
f:\git\bin;
附加 PATH 创建位于C:\Python27\Lib\distutils\distutils.cfg
的 distutils.cfg :
[build]
compiler=mingw32
不幸的是我仍然遇到同样的错误。
这与执行setup.py install build --compiler=mingw32
是一回事吗?如果不是如何让setup.py在读取requirements.txt时使用--compiler = mingw32参数?
我的f:\ git \ bin的内容是:
drwxr-xr-x 19 bsmith Administ 0 Nov 23 10:33 ..
-rwxr-xr-x 1 bsmith Administ 215040 Oct 23 03:26 antiword.exe
-rwxr-xr-x 1 bsmith Administ 540 Jun 27 2012 astextplain
-rwxr-xr-x 1 bsmith Administ 170 Jun 27 2012 awk
-rwxr-xr-x 1 bsmith Administ 18432 Oct 23 03:26 basename.exe
-rwxr-xr-x 1 bsmith Administ 540672 Oct 23 03:26 bash.exe
-rwxr-xr-x 1 bsmith Administ 1299968 Oct 23 03:26 bison.exe
-rwxr-xr-x 1 bsmith Administ 188 Jun 27 2012 bunzip2
-rwxr-xr-x 1 bsmith Administ 75264 Oct 23 03:26 bzip2.exe
-rwxr-xr-x 1 bsmith Administ 3802 Jun 27 2012 c_rehash
-rwxr-xr-x 1 bsmith Administ 22528 Oct 23 03:26 cat.exe
-rwxr-xr-x 1 bsmith Administ 28160 Oct 23 03:26 chmod.exe
-rwxr-xr-x 1 bsmith Administ 103 Jun 27 2012 clear
-rwxr-xr-x 1 bsmith Administ 11264 Oct 23 03:26 cmp.exe
-rwxr-xr-x 1 bsmith Administ 52224 Oct 23 03:26 connect.exe
-rwxr-xr-x 1 bsmith Administ 74240 Oct 23 03:26 cp.exe
-rw-r--r-- 1 bsmith Administ 227107 Jul 10 2012 curl-ca-bundle.
-rwxr-xr-x 1 bsmith Administ 404992 Oct 23 03:26 curl.exe
-rwxr-xr-x 1 bsmith Administ 24064 Oct 23 03:26 cut.exe
-rwxr-xr-x 1 bsmith Administ 47616 Oct 23 03:26 date.exe
-rwxr-xr-x 1 bsmith Administ 68608 Oct 23 03:26 diff.exe
-rwxr-xr-x 1 bsmith Administ 17920 Oct 23 03:26 dirname.exe
-rwxr-xr-x 1 bsmith Administ 11763 Jun 27 2012 docx2txt
-rwxr-xr-x 1 bsmith Administ 15872 Oct 23 03:26 dos2unix.exe
-rwxr-xr-x 1 bsmith Administ 65536 Oct 23 03:26 du.exe
-rwxr-xr-x 1 bsmith Administ 171 Jun 27 2012 echo
-rwxr-xr-x 1 bsmith Administ 175 Jun 27 2012 egrep
-rwxr-xr-x 1 bsmith Administ 18944 Oct 23 03:26 env.exe
-rwxr-xr-x 1 bsmith Administ 49152 Oct 23 03:26 expr.exe
-rwxr-xr-x 1 bsmith Administ 12288 Oct 23 03:26 false.exe
-rwxr-xr-x 1 bsmith Administ 52224 Oct 23 03:26 find.exe
-rwxr-xr-x 1 bsmith Administ 1330176 Oct 23 03:26 flex.exe
-rwxr-xr-x 1 bsmith Administ 149504 Oct 23 03:26 gawk.exe
-rwxr-xr-x 1 bsmith Administ 5632 Oct 23 03:26 getcp.exe
-rwxr-xr-x 1 bsmith Administ 1363968 Oct 23 03:26 git-receive-pac
-rwxr-xr-x 1 bsmith Administ 1363968 Oct 23 03:26 git-upload-arch
-rwxr-xr-x 1 bsmith Administ 654848 Oct 23 03:26 git-upload-pack
-rwxr-xr-x 1 bsmith Administ 1363968 Oct 23 03:26 git.exe
-rwxr-xr-x 1 bsmith Administ 330727 Oct 22 17:01 gitk
-rwxr-xr-x 1 bsmith Administ 3374 Feb 28 2009 gpg-zip
-rwxr-xr-x 1 bsmith Administ 486448 Feb 28 2009 gpg.exe
-rwxr-xr-x 1 bsmith Administ 64309 Feb 28 2009 gpgsplit.exe
-rwxr-xr-x 1 bsmith Administ 217749 Feb 28 2009 gpgv.exe
-rwxr-xr-x 1 bsmith Administ 81408 Oct 23 03:26 grep.exe
-rwxr-xr-x 1 bsmith Administ 50688 Oct 23 03:26 gunzip.exe
-rwxr-xr-x 1 bsmith Administ 50688 Oct 23 03:26 gzip.exe
-rwxr-xr-x 1 bsmith Administ 26624 Oct 23 03:26 head.exe
-rwxr-xr-x 1 bsmith Administ 21504 Oct 23 03:26 id.exe
-rwxr-xr-x 1 bsmith Administ 10240 Oct 23 03:26 kill.exe
-rwxr-xr-x 1 bsmith Administ 112128 Oct 23 03:26 less.exe
-rwxr-xr-x 1 bsmith Administ 812063 Jun 27 2012 libW11.dll
-rwxr-xr-x 1 bsmith Administ 200015 Jun 27 2012 libapr-0-0.dll
-rwxr-xr-x 1 bsmith Administ 146280 Jun 27 2012 libaprutil-0-0.
-rwxr-xr-x 1 bsmith Administ 1723196 Jun 6 2012 libcrypto.dll
-rwxr-xr-x 1 bsmith Administ 411907 Jan 12 2012 libcurl-4.dll
-rwxr-xr-x 1 bsmith Administ 184599 Jun 27 2012 libexpat-0.dll
-rw-r--r-- 1 bsmith Administ 7465 Jan 12 2012 libgsasl-7.def
-rwxr-xr-x 1 bsmith Administ 443550 Jan 12 2012 libgsasl-7.dll
-rwxr-xr-x 1 bsmith Administ 1241889 May 31 2012 libiconv-2.dll
-rwxr-xr-x 1 bsmith Administ 978432 Feb 28 2009 libiconv2.dll
-rwxr-xr-x 1 bsmith Administ 177216 Jun 27 2012 libneon-25.dll
-rwxr-xr-x 1 bsmith Administ 4884531 Jan 12 2012 libpoppler-7.dl
-rwxr-xr-x 1 bsmith Administ 378238 Jun 6 2012 libssl.dll
-rwxr-xr-x 1 bsmith Administ 255849 Jun 27 2012 libsvn_client-1
-rwxr-xr-x 1 bsmith Administ 77401 Jun 27 2012 libsvn_delta-1-
-rwxr-xr-x 1 bsmith Administ 57948 Jun 27 2012 libsvn_diff-1-0
-rwxr-xr-x 1 bsmith Administ 49557 Jun 27 2012 libsvn_fs-1-0.d
-rwxr-xr-x 1 bsmith Administ 172387 Jun 27 2012 libsvn_fs_fs-1-
-rwxr-xr-x 1 bsmith Administ 37342 Jun 27 2012 libsvn_ra-1-0.d
-rwxr-xr-x 1 bsmith Administ 181083 Jun 27 2012 libsvn_ra_dav-1
-rwxr-xr-x 1 bsmith Administ 62039 Jun 27 2012 libsvn_ra_local
-rwxr-xr-x 1 bsmith Administ 123176 Jun 27 2012 libsvn_ra_svn-1
-rwxr-xr-x 1 bsmith Administ 202003 Jun 27 2012 libsvn_repos-1-
-rwxr-xr-x 1 bsmith Administ 266235 Jun 27 2012 libsvn_subr-1-0
-rwxr-xr-x 1 bsmith Administ 73712 Jun 27 2012 libsvn_swig_per
-rwxr-xr-x 1 bsmith Administ 284454 Jun 27 2012 libsvn_wc-1-0.d
-rwxr-xr-x 1 bsmith Administ 194947 Jun 27 2012 libz.dll
-rwxr-xr-x 1 bsmith Administ 72704 Oct 23 03:26 ln.exe
-rwxr-xr-x 1 bsmith Administ 69632 Oct 23 03:26 ls.exe
-rwxr-xr-x 1 bsmith Administ 200192 Oct 23 03:26 m4.exe
-rwxr-xr-x 1 bsmith Administ 27648 Oct 23 03:26 md5sum.exe
-rwxr-xr-x 1 bsmith Administ 28672 Oct 23 03:26 mkdir.exe
-rwxr-xr-x 1 bsmith Administ 108544 Oct 23 03:26 msmtp.exe
-rwxr-xr-x 1 bsmith Administ 743240 Feb 10 2012 msys-1.0.dll
-rwxr-xr-x 1 bsmith Administ 1325053 Jun 27 2012 msys-crypto-0.9
-rwxr-xr-x 1 bsmith Administ 19968 Jun 27 2012 msys-minires.dl
-rwxr-xr-x 1 bsmith Administ 939520 Jun 27 2012 msys-perl5_8.dl
-rwxr-xr-x 1 bsmith Administ 82852 Jun 27 2012 msys-regex-1.dl
-rwxr-xr-x 1 bsmith Administ 317994 Jun 27 2012 msys-ssl-0.9.8.
-rwxr-xr-x 1 bsmith Administ 91792 Jun 27 2012 msys-z.dll
-rwxr-xr-x 1 bsmith Administ 52064 Jun 27 2012 msysltdl-3.dll
-rwxr-xr-x 1 bsmith Administ 81408 Oct 23 03:26 mv.exe
-rwxr-xr-x 1 bsmith Administ 353280 Oct 23 03:26 openssl.exe
-rwxr-xr-x 1 bsmith Administ 57344 Oct 23 03:26 patch.exe
-rw-r--r-- 1 bsmith Administ 570 Feb 28 2009 patch.exe.manif
-rwxr-xr-x 1 bsmith Administ 28160 Oct 23 03:26 pdfinfo.exe
-rwxr-xr-x 1 bsmith Administ 29184 Oct 23 03:26 pdftotext.exe
-rwxr-xr-x 1 bsmith Administ 7168 Oct 23 03:26 perl.exe
-rwxr-xr-x 1 bsmith Administ 175 Jun 27 2012 printf
-rwxr-xr-x 1 bsmith Administ 10240 Oct 23 03:26 ps.exe
-rwxr-xr-x 1 bsmith Administ 65124 Jun 27 2012 pthreadGC2.dll
-rwxr-xr-x 1 bsmith Administ 169 Jun 27 2012 pwd
-rwxr-xr-x 1 bsmith Administ 303616 Oct 23 03:26 rebase.exe
-rwxr-xr-x 1 bsmith Administ 2137 Jun 27 2012 recodetree
-rwxr-xr-x 1 bsmith Administ 62464 Oct 23 03:26 rm.exe
-rwxr-xr-x 1 bsmith Administ 22528 Oct 23 03:26 rmdir.exe
-rwxr-xr-x 1 bsmith Administ 102400 Oct 23 03:26 rxvt.exe
-rwxr-xr-x 1 bsmith Administ 43008 Oct 23 03:26 scp.exe
-rwxr-xr-x 1 bsmith Administ 1146880 Oct 23 03:26 sed.exe
-rwxr-xr-x 1 bsmith Administ 540672 Oct 23 03:26 sh.exe
-rwxr-xr-x 1 bsmith Administ 18432 Oct 23 03:26 sleep.exe
-rwxr-xr-x 1 bsmith Administ 39936 Oct 23 03:26 sort.exe
-rwxr-xr-x 1 bsmith Administ 23552 Oct 23 03:26 split.exe
-rwxr-xr-x 1 bsmith Administ 81920 Oct 23 03:26 ssh-add.exe
-rwxr-xr-x 1 bsmith Administ 69632 Oct 23 03:26 ssh-agent.exe
-rwxr-xr-x 1 bsmith Administ 109056 Oct 23 03:26 ssh-keygen.exe
-rwxr-xr-x 1 bsmith Administ 144384 Oct 23 03:26 ssh-keyscan.exe
-rwxr-xr-x 1 bsmith Administ 256000 Oct 23 03:26 ssh.exe
-rwxr-xr-x 1 bsmith Administ 192 Jun 27 2012 start
-rwxr-xr-x 1 bsmith Administ 35840 Oct 23 03:26 tail.exe
-rwxr-xr-x 1 bsmith Administ 1353728 Oct 23 03:26 tar.exe
-rwxr-xr-x 1 bsmith Administ 843776 Jan 12 2012 tcl85.dll
-rwxr-xr-x 1 bsmith Administ 16384 Jan 12 2012 tclpip85.dll
-rwxr-xr-x 1 bsmith Administ 7680 Oct 23 03:26 tclsh.exe
-rwxr-xr-x 1 bsmith Administ 7680 Oct 23 03:26 tclsh85.exe
-rwxr-xr-x 1 bsmith Administ 19456 Oct 23 03:26 tee.exe
-rwxr-xr-x 1 bsmith Administ 1011712 Jan 12 2012 tk85.dll
-rwxr-xr-x 1 bsmith Administ 38400 Oct 23 03:26 touch.exe
-rwxr-xr-x 1 bsmith Administ 33280 Oct 23 03:26 tr.exe
-rwxr-xr-x 1 bsmith Administ 12288 Oct 23 03:26 true.exe
-rwxr-xr-x 1 bsmith Administ 18944 Oct 23 03:26 uname.exe
-rwxr-xr-x 1 bsmith Administ 24576 Oct 23 03:26 uniq.exe
-rwxr-xr-x 1 bsmith Administ 159232 Oct 23 03:26 unzip.exe
-rwxr-xr-x 1 bsmith Administ 45 Jun 27 2012 vi
-rwxr-xr-x 1 bsmith Administ 45 Jun 27 2012 vim
-rwxr-xr-x 1 bsmith Administ 32256 Oct 23 03:26 wc.exe
-rwxr-xr-x 1 bsmith Administ 173 Jun 27 2012 which
-rwxr-xr-x 1 bsmith Administ 10240 Oct 23 03:26 wish.exe
-rwxr-xr-x 1 bsmith Administ 10240 Oct 23 03:26 wish85.exe
-rwxr-xr-x 1 bsmith Administ 12288 Oct 23 03:26 xargs.exe
答案 0 :(得分:0)
我在网上找到了解决方案,但没有对其进行测试: 安装MinGW。在MinGW的bin词典中找到mingw32-make.exe,复制它并重命名为make.exe 其他程序与您的问题相同。
答案 1 :(得分:0)
我有同样的错误;和该解决方案中解释的解决方案无效。
我的解决方法是安装cygwin并将其python用作我的windows的默认python。
注意:cygwin上python的默认版本是2.6
答案 2 :(得分:0)
您似乎在为此项目使用Python 2.7,但是您的错误消息:
UserWarning:未知的分发选项:'use_2to3'warnings.warn(msg)错误:无法找到vcvarsall.bat
指的是将Python 2.x转换为Python 3.x语法的2to3实用程序。
http://docs.python.org/2/library/2to3.html
您确定使用的是适用于您的操作系统的所有Python 2.7库吗?
答案 3 :(得分:0)
我最终能够使用https://zignar.net/2012/06/17/install-python-on-windows/找到答案。
感谢您的帮助。事实证明,我现在明白GIT-BASH不包含ming32w所包含的编译器。
此致
比尔