gpt4 book ai didi

python - 安装 distutils 包时如何使用 mingw32?

转载 作者:太空狗 更新时间:2023-10-29 13:47:19 25 4
gpt4 key购买 nike

我遇到了 a github project,我正在尝试安装并运行它,但遇到了一些问题。我也把它放在 as an issue 上。那里提供了整个 pip 日志。

问题似乎与 distutils 有关,如果我理解正确的话:

f:\python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'use_2to3' warnings.warn(msg) error: Unable to find vcvarsall.bat

查找这个,我被定向到 error: Unable to find vcvarsall.bat

现在检查我的系统,我安装了 MS Visual C++ 2005、2008、2010。我没有 visual studio。我正在使用带有安装了 MINGW32 的 git-bash 的 win 7。在上面的线程中,fpessoa 讨论了 setup.py install build --compiler=mingw32。我决定尝试以下方法:

  1. 我已经安装了 python 2.7。
  2. 将 mingw32 的 bin 目录添加到环境变量:将 PATH 附加到 f:\git\bin;
  3. 创建位于 C:\Python27\Lib\distutils\distutils.cfgdistutils.cfg 到:

    [build]
    compiler=mingw32

不幸的是,我仍然遇到同样的错误。

这与执行 setup.py install build --compiler=mingw32 是一回事吗?如果不是,我如何让 setup.py 在读取 requirement.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

最佳答案

我在网上找到了一个解决方案,但还没有测试过: 安装 MinGW 。在MinGW的bin字典中找到mingw32-make.exe,复制并重命名为make.exe 其他程序与您的问题相同。

关于python - 安装 distutils 包时如何使用 mingw32?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15364106/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com