在Python中使用AES加密时需要用到pycrypto,但在安装时报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
C:\> pip install pycrypto Collecting pycrypto Downloading https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446kB) 100% |████████████████████████████████| 450kB 72kB/s Installing collected packages: pycrypto Running setup.py install for pycrypto ... error Complete output from command d:\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\m\\AppData\\Local\\Temp\\pip-install-8pjcy_w1\\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\m\AppData\Local\Temp\pip-record-l1d2oyp1\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\Crypto copying lib\Crypto\pct_warnings.py -> build\lib.win-amd64-3.6\Crypto copying lib\Crypto\__init__.py -> build\lib.win-amd64-3.6\Crypto creating build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\hashalgo.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\HMAC.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\MD2.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\MD4.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\MD5.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\RIPEMD.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\SHA.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\SHA224.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\SHA256.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\SHA384.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\SHA512.py -> build\lib.win-amd64-3.6\Crypto\Hash copying lib\Crypto\Hash\__init__.py -> build\lib.win-amd64-3.6\Crypto\Hash creating build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\AES.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\ARC2.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\ARC4.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\blockalgo.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\Blowfish.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\CAST.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\DES.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\DES3.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\PKCS1_OAEP.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\PKCS1_v1_5.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\XOR.py -> build\lib.win-amd64-3.6\Crypto\Cipher copying lib\Crypto\Cipher\__init__.py -> build\lib.win-amd64-3.6\Crypto\Cipher creating build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\asn1.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\Counter.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\number.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\py3compat.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\randpool.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\RFC1751.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\winrandom.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\_number_new.py -> build\lib.win-amd64-3.6\Crypto\Util copying lib\Crypto\Util\__init__.py -> build\lib.win-amd64-3.6\Crypto\Util creating build\lib.win-amd64-3.6\Crypto\Random copying lib\Crypto\Random\random.py -> build\lib.win-amd64-3.6\Crypto\Random copying lib\Crypto\Random\_UserFriendlyRNG.py -> build\lib.win-amd64-3.6\Crypto\Random copying lib\Crypto\Random\__init__.py -> build\lib.win-amd64-3.6\Crypto\Random creating build\lib.win-amd64-3.6\Crypto\Random\Fortuna copying lib\Crypto\Random\Fortuna\FortunaAccumulator.py -> build\lib.win-amd64-3.6\Crypto\Random\Fortuna copying lib\Crypto\Random\Fortuna\FortunaGenerator.py -> build\lib.win-amd64-3.6\Crypto\Random\Fortuna copying lib\Crypto\Random\Fortuna\SHAd256.py -> build\lib.win-amd64-3.6\Crypto\Random\Fortuna copying lib\Crypto\Random\Fortuna\__init__.py -> build\lib.win-amd64-3.6\Crypto\Random\Fortuna creating build\lib.win-amd64-3.6\Crypto\Random\OSRNG copying lib\Crypto\Random\OSRNG\fallback.py -> build\lib.win-amd64-3.6\Crypto\Random\OSRNG copying lib\Crypto\Random\OSRNG\nt.py -> build\lib.win-amd64-3.6\Crypto\Random\OSRNG copying lib\Crypto\Random\OSRNG\posix.py -> build\lib.win-amd64-3.6\Crypto\Random\OSRNG copying lib\Crypto\Random\OSRNG\rng_base.py -> build\lib.win-amd64-3.6\Crypto\Random\OSRNG copying lib\Crypto\Random\OSRNG\__init__.py -> build\lib.win-amd64-3.6\Crypto\Random\OSRNG creating build\lib.win-amd64-3.6\Crypto\SelfTest copying lib\Crypto\SelfTest\st_common.py -> build\lib.win-amd64-3.6\Crypto\SelfTest copying lib\Crypto\SelfTest\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest creating build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\common.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_AES.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_ARC2.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_ARC4.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_Blowfish.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_CAST.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_DES.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_DES3.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_pkcs1_15.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_pkcs1_oaep.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\test_XOR.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher copying lib\Crypto\SelfTest\Cipher\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Cipher creating build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\common.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_HMAC.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_MD2.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_MD4.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_MD5.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_RIPEMD.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_SHA.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_SHA224.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_SHA256.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_SHA384.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\test_SHA512.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash copying lib\Crypto\SelfTest\Hash\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Hash creating build\lib.win-amd64-3.6\Crypto\SelfTest\Protocol copying lib\Crypto\SelfTest\Protocol\test_AllOrNothing.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Protocol copying lib\Crypto\SelfTest\Protocol\test_chaffing.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Protocol copying lib\Crypto\SelfTest\Protocol\test_KDF.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Protocol copying lib\Crypto\SelfTest\Protocol\test_rfc1751.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Protocol copying lib\Crypto\SelfTest\Protocol\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Protocol creating build\lib.win-amd64-3.6\Crypto\SelfTest\PublicKey copying lib\Crypto\SelfTest\PublicKey\test_DSA.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\PublicKey copying lib\Crypto\SelfTest\PublicKey\test_ElGamal.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\PublicKey copying lib\Crypto\SelfTest\PublicKey\test_importKey.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\PublicKey copying lib\Crypto\SelfTest\PublicKey\test_RSA.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\PublicKey copying lib\Crypto\SelfTest\PublicKey\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\PublicKey creating build\lib.win-amd64-3.6\Crypto\SelfTest\Random copying lib\Crypto\SelfTest\Random\test_random.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random copying lib\Crypto\SelfTest\Random\test_rpoolcompat.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random copying lib\Crypto\SelfTest\Random\test__UserFriendlyRNG.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random copying lib\Crypto\SelfTest\Random\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random creating build\lib.win-amd64-3.6\Crypto\SelfTest\Random\Fortuna copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaAccumulator.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\Fortuna copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaGenerator.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\Fortuna copying lib\Crypto\SelfTest\Random\Fortuna\test_SHAd256.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\Fortuna copying lib\Crypto\SelfTest\Random\Fortuna\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\Fortuna creating build\lib.win-amd64-3.6\Crypto\SelfTest\Random\OSRNG copying lib\Crypto\SelfTest\Random\OSRNG\test_fallback.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\OSRNG copying lib\Crypto\SelfTest\Random\OSRNG\test_generic.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\OSRNG copying lib\Crypto\SelfTest\Random\OSRNG\test_nt.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\OSRNG copying lib\Crypto\SelfTest\Random\OSRNG\test_posix.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\OSRNG copying lib\Crypto\SelfTest\Random\OSRNG\test_winrandom.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\OSRNG copying lib\Crypto\SelfTest\Random\OSRNG\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Random\OSRNG creating build\lib.win-amd64-3.6\Crypto\SelfTest\Util copying lib\Crypto\SelfTest\Util\test_asn1.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Util copying lib\Crypto\SelfTest\Util\test_Counter.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Util copying lib\Crypto\SelfTest\Util\test_number.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Util copying lib\Crypto\SelfTest\Util\test_winrandom.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Util copying lib\Crypto\SelfTest\Util\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Util creating build\lib.win-amd64-3.6\Crypto\SelfTest\Signature copying lib\Crypto\SelfTest\Signature\test_pkcs1_15.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Signature copying lib\Crypto\SelfTest\Signature\test_pkcs1_pss.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Signature copying lib\Crypto\SelfTest\Signature\__init__.py -> build\lib.win-amd64-3.6\Crypto\SelfTest\Signature creating build\lib.win-amd64-3.6\Crypto\Protocol copying lib\Crypto\Protocol\AllOrNothing.py -> build\lib.win-amd64-3.6\Crypto\Protocol copying lib\Crypto\Protocol\Chaffing.py -> build\lib.win-amd64-3.6\Crypto\Protocol copying lib\Crypto\Protocol\KDF.py -> build\lib.win-amd64-3.6\Crypto\Protocol copying lib\Crypto\Protocol\__init__.py -> build\lib.win-amd64-3.6\Crypto\Protocol creating build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\DSA.py -> build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\ElGamal.py -> build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\pubkey.py -> build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\RSA.py -> build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\_DSA.py -> build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\_RSA.py -> build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\_slowmath.py -> build\lib.win-amd64-3.6\Crypto\PublicKey copying lib\Crypto\PublicKey\__init__.py -> build\lib.win-amd64-3.6\Crypto\PublicKey creating build\lib.win-amd64-3.6\Crypto\Signature copying lib\Crypto\Signature\PKCS1_PSS.py -> build\lib.win-amd64-3.6\Crypto\Signature copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win-amd64-3.6\Crypto\Signature copying lib\Crypto\Signature\__init__.py -> build\lib.win-amd64-3.6\Crypto\Signature Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma running build_ext warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. building 'Crypto.Random.OSRNG.winrandom' extension creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\src C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Id:\python\python36\include -Id:\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-ID:\Windows Kits\10\include\10.0.17134.0\ucrt" "-ID:\Windows Kits\10\include\10.0.17134.0\shared" "-ID:\Windows Kits\10\include\10.0.17134.0\um" "-ID:\Windows Kits\10\include\10.0.17134.0\winrt" "-ID:\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc/winrand.c /Fobuild\temp.win-amd64-3.6\Release\src/winrand.obj winrand.c D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(27): error C2061: 语法错误: 标识符“intmax_t” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(28): error C2061: 语法错误: 标识符“rem” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(28): error C2059: 语法错误:“;” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(29): error C2059: 语法错误:“}” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(31): error C2061: 语法错误: 标识符“imaxdiv_t” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(31): error C2059: 语法错误:“;” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(41): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2146: 语法错误: 缺少“)”(在标识符“_Number”的 前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2061: 语法错误: 标识符“_Number” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2059: 语法错误:“;” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(43): error C2059: 语法错误:“)” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(46): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2146: 语法错误: 缺少“)”(在标识符“_Numerator”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2061: 语法错误: 标识符“_Numerator” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2059: 语法错误:“;” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2059: 语法错误:“,” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(49): error C2059: 语法错误:“)” D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(51): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(57): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(64): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(70): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(77): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(83): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(90): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(96): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面) error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2 ---------------------------------------- Command "d:\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\m\\AppData\\Local\\Temp\\pip-install-8pjcy_w1\\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\m\AppData\Local\Temp\pip-record-l1d2oyp1\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\m\AppData\Local\Temp\pip-install-8pjcy_w1\pycrypto\ |
在GitHub的Issue里找到类似的问题,使用如下的步骤进行:
1 2 3 4 5 6 |
cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build" vcvarsall amd64 cd \ set CL=-FI"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\include\stdint.h" pip install pycrypto |
注意,需要根据具体情况修改上述路径(笔者使用的是Visual Studio 2017 专业版),注意查找 vcvarsall 和 stdint.h 两个文件即可。之后即可安装成功。
参考资料:
1、https://github.com/dlitz/pycrypto/issues/218
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » 64位Win10操作系统Python 3.6安装pycrypto 2.6失败问题的解决