Building wheel for pycrypto setup py error

I encountered a problem when I try to download a certain package: C:Python27Scripts>pip install pycrypto Collecting pycrypto Using cached https://files.pythonhosted.org/packages/60/db/

After so many try with errors, now i have one solution for pycrypto and splunklib

Code of my Docker file that need to update :

FROM python:3.8-slim
RUN mkdir /app
WORKDIR /app
COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends gcc build- 
essential postgresql libpq-dev vim
COPY . /app
WORKDIR /app/api
EXPOSE 3000
CMD ["uvicorn", "api:app", "--host", "0.0.0.0",  "--port", "3000", "--reload"]

requirements.txt have

pycryptodome==3.14.1

splunk-sdk==1.6.19

splunklib==1.0.0

….

below error was showing for me when try to run above docker file code

            Building wheel for splunk-sdk (setup.py): started

            #9 80.50   Building wheel for splunk-sdk (setup.py): finished with status 'done'

            #9 80.51   Created wheel for splunk-sdk: filename=splunk_sdk-1.6.20-py3-none-any.whl 
            size=124053 sha256=ddce3663bb166c6732e18f1ed95187528c2a666b996eff7dfac00302cf9771d7

            #9 80.51   Stored in directory: /tmp/pip-ephem-wheel-cache-
            frl315nd/wheels/f7/a1/72/b2474c8ffe6b02fe24078e3413ed668fe6b85dfb17cd8e64c2

            #9 80.51   Building wheel for pycrypto (setup.py): started

            #9 92.72   Building wheel for pycrypto (setup.py): finished with status 'error'
            #9 92.76   error: subprocess-exited-with-error

            Running setup.py install for pycrypto: started

            #9 106.8   Running setup.py install for pycrypto: finished with status 'error'

            #9 106.9   error: subprocess-exited-with-error note: This error originates from a subprocess, and is likely not a problem with pip.

            #9 106.9 error: legacy-install-failure
            #9 106.9 Encountered error while trying to install package.
            #9 106.9 pycrypto

**Solution ** — Now i am updating docker file with below code

            FROM python:3.8-slim
            RUN mkdir /app
            WORKDIR /app
            COPY requirements.txt /app
            RUN apt-get update && apt-get install -y --no-install-recommends gcc build-essential postgresql libpq-dev vim
            RUN apt-get install -y --no-install-recommends libssl-dev libffi-dev
            RUN pip install --no-cache-dir -r requirements.txt
            COPY . /app
            WORKDIR /app/api
            EXPOSE 3000
            CMD ["uvicorn", "api:app", "--host", "0.0.0.0",  "--port", "3000", "--reload"]

enter image description here

Collecting pycrypto
  Using cached pycrypto-2.6.1.tar.gz (446 kB)
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:usersyasseappdatalocalprogramspythonpython38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\yasse\AppData\Local\Temp\pip-install-h7upu_mv\pycrypto\setup.py'"'"'; __file__='"'"'C:\Users\yasse\AppData\Local\Temp\pip-install-h7upu_mv\pycrypto\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersyasseAppDataLocalTemppip-wheel-oz8jxjiz'
       cwd: C:UsersyasseAppDataLocalTemppip-install-h7upu_mvpycrypto
  Complete output (183 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating buildlib.win-amd64-3.8
  creating buildlib.win-amd64-3.8Crypto
  copying libCryptopct_warnings.py -> buildlib.win-amd64-3.8Crypto
  copying libCrypto__init__.py -> buildlib.win-amd64-3.8Crypto
  creating buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashhashalgo.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashHMAC.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashMD2.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashMD4.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashMD5.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashRIPEMD.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashSHA.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashSHA224.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashSHA256.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashSHA384.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHashSHA512.py -> buildlib.win-amd64-3.8CryptoHash
  copying libCryptoHash__init__.py -> buildlib.win-amd64-3.8CryptoHash
  creating buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherAES.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherARC2.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherARC4.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherblockalgo.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherBlowfish.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherCAST.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherDES.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherDES3.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherPKCS1_OAEP.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherPKCS1_v1_5.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipherXOR.py -> buildlib.win-amd64-3.8CryptoCipher
  copying libCryptoCipher__init__.py -> buildlib.win-amd64-3.8CryptoCipher
  creating buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtilasn1.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtilCounter.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtilnumber.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtilpy3compat.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtilrandpool.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtilRFC1751.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtilwinrandom.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtil_number_new.py -> buildlib.win-amd64-3.8CryptoUtil
  copying libCryptoUtil__init__.py -> buildlib.win-amd64-3.8CryptoUtil
  creating buildlib.win-amd64-3.8CryptoRandom
  copying libCryptoRandomrandom.py -> buildlib.win-amd64-3.8CryptoRandom
  copying libCryptoRandom_UserFriendlyRNG.py -> buildlib.win-amd64-3.8CryptoRandom
  copying libCryptoRandom__init__.py -> buildlib.win-amd64-3.8CryptoRandom
  creating buildlib.win-amd64-3.8CryptoRandomFortuna
  copying libCryptoRandomFortunaFortunaAccumulator.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
  copying libCryptoRandomFortunaFortunaGenerator.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
  copying libCryptoRandomFortunaSHAd256.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
  copying libCryptoRandomFortuna__init__.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
  creating buildlib.win-amd64-3.8CryptoRandomOSRNG
  copying libCryptoRandomOSRNGfallback.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
  copying libCryptoRandomOSRNGnt.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
  copying libCryptoRandomOSRNGposix.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
  copying libCryptoRandomOSRNGrng_base.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
  copying libCryptoRandomOSRNG__init__.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
  creating buildlib.win-amd64-3.8CryptoSelfTest
  copying libCryptoSelfTestst_common.py -> buildlib.win-amd64-3.8CryptoSelfTest
  copying libCryptoSelfTest__init__.py -> buildlib.win-amd64-3.8CryptoSelfTest
  creating buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphercommon.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_AES.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_ARC2.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_ARC4.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_Blowfish.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_CAST.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_DES.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_DES3.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_pkcs1_15.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_pkcs1_oaep.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCiphertest_XOR.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  copying libCryptoSelfTestCipher__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
  creating buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashcommon.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_HMAC.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_MD2.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_MD4.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_MD5.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_RIPEMD.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_SHA.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_SHA224.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_SHA256.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_SHA384.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHashtest_SHA512.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  copying libCryptoSelfTestHash__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
  creating buildlib.win-amd64-3.8CryptoSelfTestProtocol
  copying libCryptoSelfTestProtocoltest_AllOrNothing.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
  copying libCryptoSelfTestProtocoltest_chaffing.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
  copying libCryptoSelfTestProtocoltest_KDF.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
  copying libCryptoSelfTestProtocoltest_rfc1751.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
  copying libCryptoSelfTestProtocol__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
  creating buildlib.win-amd64-3.8CryptoSelfTestPublicKey
  copying libCryptoSelfTestPublicKeytest_DSA.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
  copying libCryptoSelfTestPublicKeytest_ElGamal.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
  copying libCryptoSelfTestPublicKeytest_importKey.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
  copying libCryptoSelfTestPublicKeytest_RSA.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
  copying libCryptoSelfTestPublicKey__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
  creating buildlib.win-amd64-3.8CryptoSelfTestRandom
  copying libCryptoSelfTestRandomtest_random.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
  copying libCryptoSelfTestRandomtest_rpoolcompat.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
  copying libCryptoSelfTestRandomtest__UserFriendlyRNG.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
  copying libCryptoSelfTestRandom__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
  creating buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
  copying libCryptoSelfTestRandomFortunatest_FortunaAccumulator.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
  copying libCryptoSelfTestRandomFortunatest_FortunaGenerator.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
  copying libCryptoSelfTestRandomFortunatest_SHAd256.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
  copying libCryptoSelfTestRandomFortuna__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
  creating buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
  copying libCryptoSelfTestRandomOSRNGtest_fallback.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
  copying libCryptoSelfTestRandomOSRNGtest_generic.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
  copying libCryptoSelfTestRandomOSRNGtest_nt.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
  copying libCryptoSelfTestRandomOSRNGtest_posix.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
  copying libCryptoSelfTestRandomOSRNGtest_winrandom.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
  copying libCryptoSelfTestRandomOSRNG__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
  creating buildlib.win-amd64-3.8CryptoSelfTestUtil
  copying libCryptoSelfTestUtiltest_asn1.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
  copying libCryptoSelfTestUtiltest_Counter.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
  copying libCryptoSelfTestUtiltest_number.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
  copying libCryptoSelfTestUtiltest_winrandom.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
  copying libCryptoSelfTestUtil__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
  creating buildlib.win-amd64-3.8CryptoSelfTestSignature
  copying libCryptoSelfTestSignaturetest_pkcs1_15.py -> buildlib.win-amd64-3.8CryptoSelfTestSignature
  copying libCryptoSelfTestSignaturetest_pkcs1_pss.py -> buildlib.win-amd64-3.8CryptoSelfTestSignature
  copying libCryptoSelfTestSignature__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestSignature
  creating buildlib.win-amd64-3.8CryptoProtocol
  copying libCryptoProtocolAllOrNothing.py -> buildlib.win-amd64-3.8CryptoProtocol
  copying libCryptoProtocolChaffing.py -> buildlib.win-amd64-3.8CryptoProtocol
  copying libCryptoProtocolKDF.py -> buildlib.win-amd64-3.8CryptoProtocol
  copying libCryptoProtocol__init__.py -> buildlib.win-amd64-3.8CryptoProtocol
  creating buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKeyDSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKeyElGamal.py -> buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKeypubkey.py -> buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKeyRSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKey_DSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKey_RSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKey_slowmath.py -> buildlib.win-amd64-3.8CryptoPublicKey
  copying libCryptoPublicKey__init__.py -> buildlib.win-amd64-3.8CryptoPublicKey
  creating buildlib.win-amd64-3.8CryptoSignature
  copying libCryptoSignaturePKCS1_PSS.py -> buildlib.win-amd64-3.8CryptoSignature
  copying libCryptoSignaturePKCS1_v1_5.py -> buildlib.win-amd64-3.8CryptoSignature
  copying libCryptoSignature__init__.py -> buildlib.win-amd64-3.8CryptoSignature
  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 buildtemp.win-amd64-3.8
  creating buildtemp.win-amd64-3.8Release
  creating buildtemp.win-amd64-3.8Releasesrc
  C:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC14.16.27023binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Ic:usersyasseappdatalocalprogramspythonpython38include -Ic:usersyasseappdatalocalprogramspythonpython38include "-IC:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC14.16.27023ATLMFCinclude" "-IC:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC14.16.27023include" "-IC:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0um" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0cppwinrt" /Tcsrc/winrand.c /Fobuildtemp.win-amd64-3.8Releasesrc/winrand.obj
  winrand.c
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(27): error C2061: syntax error: identifier 'intmax_t'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(28): error C2061: syntax error: identifier 'rem'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(28): error C2059: syntax error: ';'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(29): error C2059: syntax error: '}'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(31): error C2061: syntax error: identifier 'imaxdiv_t'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(31): error C2059: syntax error: ';'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(41): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(42): error C2146: syntax error: missing ')' before identifier '_Number'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(42): error C2061: syntax error: identifier '_Number'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(42): error C2059: syntax error: ';'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(43): error C2059: syntax error: ')'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(46): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2146: syntax error: missing ')' before identifier '_Numerator'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2061: syntax error: identifier '_Numerator'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2059: syntax error: ';'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2059: syntax error: ','
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(49): error C2059: syntax error: ')'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(51): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(57): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(64): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(70): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(77): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(83): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(90): error C2143: syntax error: missing '{' before '__cdecl'
  C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(96): error C2143: syntax error: missing '{' before '__cdecl'
  error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for pycrypto
  Running setup.py clean for pycrypto
Failed to build pycrypto
Installing collected packages: pycrypto
    Running setup.py install for pycrypto ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:usersyasseappdatalocalprogramspythonpython38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\yasse\AppData\Local\Temp\pip-install-h7upu_mv\pycrypto\setup.py'"'"'; __file__='"'"'C:\Users\yasse\AppData\Local\Temp\pip-install-h7upu_mv\pycrypto\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersyasseAppDataLocalTemppip-record-sc8vs8g6install-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersyasseappdatalocalprogramspythonpython38Includepycrypto'
         cwd: C:UsersyasseAppDataLocalTemppip-install-h7upu_mvpycrypto
    Complete output (183 lines):
    running install
    running build
    running build_py
    creating build
    creating buildlib.win-amd64-3.8
    creating buildlib.win-amd64-3.8Crypto
    copying libCryptopct_warnings.py -> buildlib.win-amd64-3.8Crypto
    copying libCrypto__init__.py -> buildlib.win-amd64-3.8Crypto
    creating buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashhashalgo.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashHMAC.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashMD2.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashMD4.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashMD5.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashRIPEMD.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashSHA.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashSHA224.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashSHA256.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashSHA384.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHashSHA512.py -> buildlib.win-amd64-3.8CryptoHash
    copying libCryptoHash__init__.py -> buildlib.win-amd64-3.8CryptoHash
    creating buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherAES.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherARC2.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherARC4.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherblockalgo.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherBlowfish.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherCAST.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherDES.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherDES3.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherPKCS1_OAEP.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherPKCS1_v1_5.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipherXOR.py -> buildlib.win-amd64-3.8CryptoCipher
    copying libCryptoCipher__init__.py -> buildlib.win-amd64-3.8CryptoCipher
    creating buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtilasn1.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtilCounter.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtilnumber.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtilpy3compat.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtilrandpool.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtilRFC1751.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtilwinrandom.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtil_number_new.py -> buildlib.win-amd64-3.8CryptoUtil
    copying libCryptoUtil__init__.py -> buildlib.win-amd64-3.8CryptoUtil
    creating buildlib.win-amd64-3.8CryptoRandom
    copying libCryptoRandomrandom.py -> buildlib.win-amd64-3.8CryptoRandom
    copying libCryptoRandom_UserFriendlyRNG.py -> buildlib.win-amd64-3.8CryptoRandom
    copying libCryptoRandom__init__.py -> buildlib.win-amd64-3.8CryptoRandom
    creating buildlib.win-amd64-3.8CryptoRandomFortuna
    copying libCryptoRandomFortunaFortunaAccumulator.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
    copying libCryptoRandomFortunaFortunaGenerator.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
    copying libCryptoRandomFortunaSHAd256.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
    copying libCryptoRandomFortuna__init__.py -> buildlib.win-amd64-3.8CryptoRandomFortuna
    creating buildlib.win-amd64-3.8CryptoRandomOSRNG
    copying libCryptoRandomOSRNGfallback.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
    copying libCryptoRandomOSRNGnt.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
    copying libCryptoRandomOSRNGposix.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
    copying libCryptoRandomOSRNGrng_base.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
    copying libCryptoRandomOSRNG__init__.py -> buildlib.win-amd64-3.8CryptoRandomOSRNG
    creating buildlib.win-amd64-3.8CryptoSelfTest
    copying libCryptoSelfTestst_common.py -> buildlib.win-amd64-3.8CryptoSelfTest
    copying libCryptoSelfTest__init__.py -> buildlib.win-amd64-3.8CryptoSelfTest
    creating buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphercommon.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_AES.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_ARC2.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_ARC4.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_Blowfish.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_CAST.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_DES.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_DES3.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_pkcs1_15.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_pkcs1_oaep.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCiphertest_XOR.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    copying libCryptoSelfTestCipher__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestCipher
    creating buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashcommon.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_HMAC.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_MD2.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_MD4.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_MD5.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_RIPEMD.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_SHA.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_SHA224.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_SHA256.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_SHA384.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHashtest_SHA512.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    copying libCryptoSelfTestHash__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestHash
    creating buildlib.win-amd64-3.8CryptoSelfTestProtocol
    copying libCryptoSelfTestProtocoltest_AllOrNothing.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
    copying libCryptoSelfTestProtocoltest_chaffing.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
    copying libCryptoSelfTestProtocoltest_KDF.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
    copying libCryptoSelfTestProtocoltest_rfc1751.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
    copying libCryptoSelfTestProtocol__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestProtocol
    creating buildlib.win-amd64-3.8CryptoSelfTestPublicKey
    copying libCryptoSelfTestPublicKeytest_DSA.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
    copying libCryptoSelfTestPublicKeytest_ElGamal.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
    copying libCryptoSelfTestPublicKeytest_importKey.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
    copying libCryptoSelfTestPublicKeytest_RSA.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
    copying libCryptoSelfTestPublicKey__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestPublicKey
    creating buildlib.win-amd64-3.8CryptoSelfTestRandom
    copying libCryptoSelfTestRandomtest_random.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
    copying libCryptoSelfTestRandomtest_rpoolcompat.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
    copying libCryptoSelfTestRandomtest__UserFriendlyRNG.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
    copying libCryptoSelfTestRandom__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestRandom
    creating buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
    copying libCryptoSelfTestRandomFortunatest_FortunaAccumulator.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
    copying libCryptoSelfTestRandomFortunatest_FortunaGenerator.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
    copying libCryptoSelfTestRandomFortunatest_SHAd256.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
    copying libCryptoSelfTestRandomFortuna__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomFortuna
    creating buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
    copying libCryptoSelfTestRandomOSRNGtest_fallback.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
    copying libCryptoSelfTestRandomOSRNGtest_generic.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
    copying libCryptoSelfTestRandomOSRNGtest_nt.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
    copying libCryptoSelfTestRandomOSRNGtest_posix.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
    copying libCryptoSelfTestRandomOSRNGtest_winrandom.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
    copying libCryptoSelfTestRandomOSRNG__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestRandomOSRNG
    creating buildlib.win-amd64-3.8CryptoSelfTestUtil
    copying libCryptoSelfTestUtiltest_asn1.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
    copying libCryptoSelfTestUtiltest_Counter.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
    copying libCryptoSelfTestUtiltest_number.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
    copying libCryptoSelfTestUtiltest_winrandom.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
    copying libCryptoSelfTestUtil__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestUtil
    creating buildlib.win-amd64-3.8CryptoSelfTestSignature
    copying libCryptoSelfTestSignaturetest_pkcs1_15.py -> buildlib.win-amd64-3.8CryptoSelfTestSignature
    copying libCryptoSelfTestSignaturetest_pkcs1_pss.py -> buildlib.win-amd64-3.8CryptoSelfTestSignature
    copying libCryptoSelfTestSignature__init__.py -> buildlib.win-amd64-3.8CryptoSelfTestSignature
    creating buildlib.win-amd64-3.8CryptoProtocol
    copying libCryptoProtocolAllOrNothing.py -> buildlib.win-amd64-3.8CryptoProtocol
    copying libCryptoProtocolChaffing.py -> buildlib.win-amd64-3.8CryptoProtocol
    copying libCryptoProtocolKDF.py -> buildlib.win-amd64-3.8CryptoProtocol
    copying libCryptoProtocol__init__.py -> buildlib.win-amd64-3.8CryptoProtocol
    creating buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKeyDSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKeyElGamal.py -> buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKeypubkey.py -> buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKeyRSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKey_DSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKey_RSA.py -> buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKey_slowmath.py -> buildlib.win-amd64-3.8CryptoPublicKey
    copying libCryptoPublicKey__init__.py -> buildlib.win-amd64-3.8CryptoPublicKey
    creating buildlib.win-amd64-3.8CryptoSignature
    copying libCryptoSignaturePKCS1_PSS.py -> buildlib.win-amd64-3.8CryptoSignature
    copying libCryptoSignaturePKCS1_v1_5.py -> buildlib.win-amd64-3.8CryptoSignature
    copying libCryptoSignature__init__.py -> buildlib.win-amd64-3.8CryptoSignature
    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 buildtemp.win-amd64-3.8
    creating buildtemp.win-amd64-3.8Release
    creating buildtemp.win-amd64-3.8Releasesrc
    C:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC14.16.27023binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Ic:usersyasseappdatalocalprogramspythonpython38include -Ic:usersyasseappdatalocalprogramspythonpython38include "-IC:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC14.16.27023ATLMFCinclude" "-IC:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCToolsMSVC14.16.27023include" "-IC:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0um" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0cppwinrt" /Tcsrc/winrand.c /Fobuildtemp.win-amd64-3.8Releasesrc/winrand.obj
    winrand.c
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(27): error C2061: syntax error: identifier 'intmax_t'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(28): error C2061: syntax error: identifier 'rem'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(28): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(29): error C2059: syntax error: '}'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(31): error C2061: syntax error: identifier 'imaxdiv_t'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(31): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(41): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(42): error C2146: syntax error: missing ')' before identifier '_Number'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(42): error C2061: syntax error: identifier '_Number'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(42): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(43): error C2059: syntax error: ')'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(46): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2146: syntax error: missing ')' before identifier '_Numerator'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2061: syntax error: identifier '_Numerator'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(47): error C2059: syntax error: ','
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(49): error C2059: syntax error: ')'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(51): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(57): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(64): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(70): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(77): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(83): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(90): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.17763.0ucrtinttypes.h(96): error C2143: syntax error: missing '{' before '__cdecl'
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:usersyasseappdatalocalprogramspythonpython38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\yasse\AppData\Local\Temp\pip-install-h7upu_mv\pycrypto\setup.py'"'"'; __file__='"'"'C:\Users\yasse\AppData\Local\Temp\pip-install-h7upu_mv\pycrypto\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersyasseAppDataLocalTemppip-record-sc8vs8g6install-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersyasseappdatalocalprogramspythonpython38Includepycrypto' Check the logs for full command output.

algo

First of all, check this and ensure that you are deploying to the supported ubuntu version.

  • Installation Problems
    • Error: “You have not agreed to the Xcode license agreements”
    • Error: checking whether the C compiler works… no
    • Error: “fatal error: ‘openssl/opensslv.h’ file not found”
    • Error: “TypeError: must be str, not bytes”
    • Error: “ansible-playbook: command not found”
    • Error: “Could not fetch URL … TLSV1_ALERT_PROTOCOL_VERSION
    • Fatal: “Failed to validate the SSL certificate for …”
    • Bad owner or permissions on .ssh
    • The region you want is not available
    • AWS: SSH permission denied with an ECDSA key
    • AWS: “Deploy the template” fails with CREATE_FAILED
    • AWS: not authorized to perform: cloudformation:UpdateStack
    • DigitalOcean: error tagging resource ‘xxxxxxxx’: param is missing or the value is empty: resources
    • Azure: The client xxx with object id xxx does not have authorization to perform action Microsoft.Resources/subscriptions/resourcegroups/write’ over scope
    • Windows: The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid
    • Docker: Failed to connect to the host via ssh
    • Error: Failed to create symlinks for deploying to localhost
    • Wireguard: Unable to find ‘configs/…’ in expected paths
    • Ubuntu Error: “unable to write ‘random state’” when generating CA password
    • Timeout when waiting for search string OpenSSH in xxx.xxx.xxx.xxx:4160
  • Connection Problems
    • I’m blocked or get CAPTCHAs when I access certain websites
    • I want to change the list of trusted Wifi networks on my Apple device
    • Error: “The VPN Service payload could not be installed.”
    • Little Snitch is broken when connected to the VPN
    • I can’t get my router to connect to the Algo server
    • I can’t get Network Manager to connect to the Algo server
    • Various websites appear to be offline through the VPN
    • Clients appear stuck in a reconnection loop
    • Wireguard: clients can connect on Wifi but not LTE
    • IPsec: Difficulty connecting through router
  • I have a problem not covered here

Installation Problems

Look here if you have a problem running the installer to set up a new Algo server.

Python version is not supported

The minimum Python version required to run Algo is 3.8. Most modern operation systems should have it by default, but if the OS you are using doesn’t meet the requirements, you have to upgrade. See the official documentation for your OS, or manual download it from https://www.python.org/downloads/. Otherwise, you may deploy from docker

Error: “You have not agreed to the Xcode license agreements”

On macOS, you tried to install the dependencies with pip and encountered the following error:

Downloading cffi-1.9.1.tar.gz (407kB): 407kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/cffi/setup.py) egg_info for package cffi

You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.

    No working compiler found, or bogus compiler options
    passed to the compiler from Python's distutils module.
    See the error messages above.

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/cffi
Storing debug log for failure in /Users/algore/Library/Logs/pip.log

The Xcode compiler is installed but requires you to accept its license agreement prior to using it. Run xcodebuild -license to agree and then retry installing the dependencies.

Error: checking whether the C compiler works… no

On macOS, you tried to install the dependencies with pip and encountered the following error:

Failed building wheel for pycrypto
Running setup.py clean for pycrypto
Failed to build pycrypto
...
copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.macosx-10.6-intel-2.7/Crypto/Signature
running build_ext
running build_configure
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in '/private/var/folders/3f/q33hl6_x6_nfyjg29fcl9qdr0000gp/T/pip-build-DB5VZp/pycrypto': configure: error: C compiler cannot create executables See config.log for more details
Traceback (most recent call last):
File "", line 1, in
...
cmd_obj.run()
File "/private/var/folders/3f/q33hl6_x6_nfyjg29fcl9qdr0000gp/T/pip-build-DB5VZp/pycrypto/setup.py", line 278, in run
raise RuntimeError("autoconf error")
RuntimeError: autoconf error

You don’t have a working compiler installed. You should install the XCode compiler by opening your terminal and running xcode-select --install.

Error: “fatal error: ‘openssl/opensslv.h’ file not found”

On macOS, you tried to install cryptography and encountered the following error:

build/temp.macosx-10.12-intel-2.7/_openssl.c:434:10: fatal error: 'openssl/opensslv.h' file not found

#include <openssl/opensslv.h>

        ^

1 error generated.

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-sREEE5-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/cryptography
Storing debug log for failure in /Users/algore/Library/Logs/pip.log

You are running an old version of pip that cannot download the binary cryptography dependency. Upgrade to a new version of pip by running sudo python3 -m pip install -U pip.

Error: “ansible-playbook: command not found”

You tried to install Algo and you see an error that reads “ansible-playbook: command not found.”

You did not finish step 4 in the installation instructions, “Install Algo’s remaining dependencies.” Algo depends on Ansible, an automation framework, and this error indicates that you do not have Ansible installed. Ansible is installed by pip when you run python3 -m pip install -r requirements.txt. You must complete the installation instructions to run the Algo server deployment process.

Fatal: “Failed to validate the SSL certificate”

You received a message like this:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate for api.digitalocean.com:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/ansible, /usr/local/etc/openssl. The exception msg was: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076).", "status": -1, "url": "https://api.digitalocean.com/v2/regions"}

Your local system does not have a CA certificate that can validate the cloud provider’s API. Are you using MacPorts instead of Homebrew? The MacPorts openssl installation does not include a CA certificate, but you can fix this by installing the curl-ca-bundle port with port install curl-ca-bundle. That should do the trick.

Could not fetch URL … TLSV1_ALERT_PROTOCOL_VERSION

You tried to install Algo and you received an error like this one:

Could not fetch URL https://pypi.python.org/simple/secretstorage/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
  Could not find a version that satisfies the requirement SecretStorage<3 (from -r requirements.txt (line 2)) (from versions: )
No matching distribution found for SecretStorage<3 (from -r requirements.txt (line 2))

It’s time to upgrade your python.

brew upgrade python3

You can also download python 3.7.x from python.org.

Bad owner or permissions on .ssh

You tried to run Algo and it quickly exits with an error about a bad owner or permissions:

fatal: [104.236.2.94]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Bad owner or permissions on /home/user/.ssh/configrn", "unreachable": true}

You need to reset the permissions on your .ssh directory. Run chmod 700 /home/user/.ssh and then chmod 600 /home/user/.ssh/config. You may need to repeat this for other files mentioned in the error message.

The region you want is not available

Algo downloads the regions from the supported cloud providers (other than Microsoft Azure) listed in the first menu using APIs. If the region you want isn’t available, the cloud provider has probably taken it offline for some reason. You should investigate further with your cloud provider.

If there’s a specific region you want to install to in Microsoft Azure that isn’t available, you should file an issue, give us information about what region is missing, and we’ll add it.

AWS: SSH permission denied with an ECDSA key

You tried to deploy Algo to AWS and you received an error like this one:

TASK [Copy the algo ssh key to the local ssh directory] ************************
ok: [localhost -> localhost]

PLAY [Configure the server and install required software] **********************

TASK [Check the system] ********************************************************
fatal: [X.X.X.X]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'X.X.X.X' (ECDSA) to the list of known hosts.rnPermission denied (publickey).rn", "unreachable": true}

You previously deployed Algo to a hosting provider other than AWS, and Algo created an ECDSA keypair at that time. You are now deploying to AWS which does not support ECDSA keys via their API. As a result, the deploy has failed.

In order to fix this issue, delete the algo.pem and algo.pem.pub keys from your configs directory and run the deploy again. If AWS is selected, Algo will now generate new RSA ssh keys which are compatible with the AWS API.

AWS: “Deploy the template fails” with CREATE_FAILED

You tried to deploy Algo to AWS and you received an error like this one:

TASK [cloud-ec2 : Make a cloudformation template] ******************************
changed: [localhost]

TASK [cloud-ec2 : Deploy the template] *****************************************
fatal: [localhost]: FAILED! => {"changed": true, "events": ["StackEvent AWS::CloudFormation::Stack algopvpn1 ROLLBACK_COMPLETE", "StackEvent AWS::EC2::VPC VPC DELETE_COMPLETE", "StackEvent AWS::EC2::InternetGateway InternetGateway DELETE_COMPLETE", "StackEvent AWS::CloudFormation::Stack algopvpn1 ROLLBACK_IN_PROGRESS", "StackEvent AWS::EC2::VPC VPC CREATE_FAILED", "StackEvent AWS::EC2::VPC VPC CREATE_IN_PROGRESS", "StackEvent AWS::EC2::InternetGateway InternetGateway CREATE_FAILED", "StackEvent AWS::EC2::InternetGateway InternetGateway CREATE_IN_PROGRESS", "StackEvent AWS::CloudFormation::Stack algopvpn1 CREATE_IN_PROGRESS"], "failed": true, "output": "Problem with CREATE. Rollback complete", "stack_outputs": {}, "stack_resources": [{"last_updated_time": null, "logical_resource_id": "InternetGateway", "physical_resource_id": null, "resource_type": "AWS::EC2::InternetGateway", "status": "DELETE_COMPLETE", "status_reason": null}, {"last_updated_time": null, "logical_resource_id": "VPC", "physical_resource_id": null, "resource_type": "AWS::EC2::VPC", "status": "DELETE_COMPLETE", "status_reason": null}]}

Algo builds a Cloudformation template to deploy to AWS. You can find the entire contents of the Cloudformation template in configs/algo.yml. In order to troubleshoot this issue, login to the AWS console, go to the Cloudformation service, find the failed deployment, click the events tab, and find the corresponding “CREATE_FAILED” events. Note that all AWS resources created by Algo are tagged with Environment => Algo for easy identification.

In many cases, failed deployments are the result of service limits being reached, such as “CREATE_FAILED AWS::EC2::VPC VPC The maximum number of VPCs has been reached.” In these cases, you must either delete the VPCs from previous deployments, or contact AWS support to increase the limits on your account.

You tried to deploy Algo to AWS and you received an error like this one:

TASK [cloud-ec2 : Deploy the template] *****************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "User: arn:aws:iam::082851645362:user/algo is not authorized to perform: cloudformation:UpdateStack on resource: arn:aws:cloudformation:us-east-1:082851645362:stack/algo/*"}

This error indicates you already have Algo deployed to Cloudformation. Need to delete it first, then re-deploy.

DigitalOcean: error tagging resource

You tried to deploy Algo to DigitalOcean and you received an error like this one:

TASK [cloud-digitalocean : Tag the droplet] ************************************
failed: [localhost] (item=staging) => {"failed": true, "item": "staging", "msg": "error tagging resource '73204383': param is missing or the value is empty: resources"}
failed: [localhost] (item=dbserver) => {"failed": true, "item": "dbserver", "msg": "error tagging resource '73204383': param is missing or the value is empty: resources"}

The error is caused because Digital Ocean changed its API to treat the tag argument as a string instead of a number.

  1. Download doctl
  2. Run doctl auth init; it will ask you for your token which you can get (or generate) on the API tab at DigitalOcean
  3. Once you are authorized on DO, you can run doctl compute tag list to see the list of tags
  4. Run doctl compute tag delete environment:algo --force to delete the environment:algo tag
  5. Finally run doctl compute tag list to make sure that the tag has been deleted
  6. Run algo as directed

Azure: No such file or directory: ‘/home/username/.azure/azureProfile.json’

 TASK [cloud-azure : Create AlgoVPN Server] *****************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. 
The error was: FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.azure/azureProfile.json'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure/cli/core/_session.py", line 39, in load
with codecs_open(self.filename, 'r', encoding=self._encoding) as f:
File "/usr/lib/python3.6/codecs.py", line 897, in openn    file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.azure/azureProfile.json'
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}

It happens when your machine is not authenticated in the azure cloud, follow this guide to configure your environment

Azure: Deployment Permissions Error

The AAD Application Registration (aka, the ‘Service Principal’, where you got the ClientId) needs permission to create the resources for the subscription. Otherwise, you will get the following error when you run the Ansible deploy script:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Resource group create_or_update failed with status code: 403 and message: The client 'xxxxx' with object id 'THE_OBJECT_ID' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/THE_SUBSCRIPTION_ID/resourcegroups/algo' or the scope is invalid. If access was recently granted, please refresh your credentials."}

The solution for this is to open the Azure CLI and run the following command to grant contributor role to the Service Principal:

az role assignment create --assignee-object-id THE_OBJECT_ID --scope subscriptions/THE_SUBSCRIPTION_ID --role contributor

After this is applied, the Service Principal has permissions to create the resources and you can re-run ansible-playbook main.yml to complete the deployment.

Windows: The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid

You tried to deploy Algo from Windows and you received an error like this one:

TASK [cloud-azure : Create an instance].
fatal: [localhost]: FAILED! => {"changed": false,
"msg": "Error creating or updating virtual machine AlgoVPN - Azure Error:
InvalidParametern
Message: The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid.n
Target: linuxConfiguration.ssh.publicKeys.keyData"}

This is related to the chmod issue inside /mnt directory which is NTFS. The fix is to place Algo outside of /mnt directory.

Docker: Failed to connect to the host via ssh

You tried to deploy Algo from Docker and you received an error like this one:

Failed to connect to the host via ssh:
Warning: Permanently added 'xxx.xxx.xxx.xxx' (ECDSA) to the list of known hosts.rn
Control socket connect(/root/.ansible/cp/6d9d22e981): Connection refusedrn
Failed to connect to new control masterrn

You need to add the following to the ansible.cfg in repo root:

[ssh_connection]
control_path_dir=/dev/shm/ansible_control_path

Error: Failed to create symlinks for deploying to localhost

You tried to run Algo and you received an error like this one:

TASK [Create a symlink if deploying to localhost] ********************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "gid": 1000, "group": "ubuntu", "mode": "0775", "msg": "the directory configs/localhost is not empty, refusing to convert it", "owner": "ubuntu", "path": "configs/localhost", "size": 4096, "state": "directory", "uid": 1000}
included: /home/ubuntu/algo-master/playbooks/rescue.yml for localhost

TASK [debug] *********************************************************************************************************
ok: [localhost] => {
    "fail_hint": [
        "Sorry, but something went wrong!",
        "Please check the troubleshooting guide.",
        "https://trailofbits.github.io/algo/troubleshooting.html"
    ]
}

TASK [Fail the installation] *****************************************************************************************

This error is usually encountered when using the local install option and localhost is provided in answer to this question, which is expecting an IP address or domain name of your server:

Enter the public IP address or domain name of your server: (IMPORTANT! This is used to verify the certificate)
[localhost]
:

You should remove the files in /etc/wireguard/ and configs/ as follows:

sudo rm -rf /etc/wireguard/*
rm -rf configs/*

And then immediately re-run ./algo and provide a domain name or IP address in response to the question referenced above.

Wireguard: Unable to find ‘configs/…’ in expected paths

You tried to run Algo and you received an error like this one:

TASK [wireguard : Generate public keys] ********************************************************************************
[WARNING]: Unable to find 'configs/xxx.xxx.xxx.xxx/wireguard//private/dan' in expected paths.

fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: configs/xxx.xxx.xxx.xxx/wireguard//private/dan"}

This error is usually hit when using the local install option on a server that isn’t Ubuntu 18.04 or later. You should upgrade your server to Ubuntu 18.04 or later. If this doesn’t work, try removing files in /etc/wireguard/ and the configs directories as follows:

sudo rm -rf /etc/wireguard/*
rm -rf configs/*

Then immediately re-run ./algo.

Ubuntu Error: “unable to write ‘random state’” when generating CA password

When running Algo, you received an error like this:

TASK [common : Generate password for the CA key] ***********************************************************************************************************************************************************
fatal: [xxx.xxx.xxx.xxx -> localhost]: FAILED! => {"changed": true, "cmd": "openssl rand -hex 16", "delta": "0:00:00.024776", "end": "2018-11-26 13:13:55.879921", "msg": "non-zero return code", "rc": 1, "start": "2018-11-26 13:13:55.855145", "stderr": "unable to write 'random state'", "stderr_lines": ["unable to write 'random state'"], "stdout": "xxxxxxxxxxxxxxxxxxx", "stdout_lines": ["xxxxxxxxxxxxxxxxxxx"]}

This happens when your user does not have ownership of the $HOME/.rnd file, which is a seed for randomization. To fix this issue, give your user ownership of the file with this command:

sudo chown $USER:$USER $HOME/.rnd

Now, run Algo again.

Old Networking Firewall In Place

You may see the following output when attemptint to run ./algo from your localhost:

TASK [Wait until SSH becomes ready...] **********************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "elapsed": 321, "msg": "Timeout when waiting for search string OpenSSH in xxx.xxx.xxx.xxx:4160"}
included: /home/<username>/algo/algo/playbooks/rescue.yml for localhost

TASK [debug] ************************************************************************************************************************************************
ok: [localhost] => {
    "fail_hint": [
        "Sorry, but something went wrong!",
        "Please check the troubleshooting guide.",
        "https://trailofbits.github.io/algo/troubleshooting.html"
    ]
}

If you see this error then one possible explanation is that you have a previous firewall configured in your cloud hosting provider which needs to be either updated or ideally removed. Removing this can often fix this issue.

Connection Problems

Look here if you deployed an Algo server but now have a problem connecting to it with a client.

I’m blocked or get CAPTCHAs when I access certain websites

This is normal.

When you deploy a Algo to a new cloud server, the address you are given may have been used before. In some cases, a malicious individual may have attacked others with that address and had it added to “IP reputation” feeds or simply a blacklist. In order to regain the trust for that address, you may be asked to enter CAPTCHAs to prove that you are a human, and not a Denial of Service (DoS) bot trying to attack others. This happens most frequently with Google. You can try entering the CAPTCHAs or you can try redeploying your Algo server to a new IP to resolve this issue.

In some cases, a website will block any visitors accessing their site through a cloud hosting provider due to previous, frequent DoS attacks originating from them. In these cases, there is not much you can do except deploy Algo to your own server or another IP that the website has not outright blocked.

I want to change the list of trusted Wifi networks on my Apple device

This setting is enforced on your client device via the Apple profile you put on it. You can edit the profile with new settings, then load it on your device to change the settings. You can use the Apple Configurator to edit and resave the profile. Advanced users can edit the file directly in a text editor. Use the Configuration Profile Reference for information about the file format and other available options. If you’re not comfortable editing the profile, you can also simply redeploy a new Algo server with different settings to receive a new auto-generated profile.

Error: “The VPN Service payload could not be installed.”

You tried to install the Apple profile on one of your devices and you received an error stating The "VPN Service" payload could not be installed. The VPN service could not be created. Client support for Algo VPN is limited to modern operating systems, e.g. macOS 10.11+, iOS 9+. Please upgrade your operating system and try again.

Little Snitch is broken when connected to the VPN

Little Snitch is not compatible with IPSEC VPNs due to a known bug in macOS and there is no solution. The Little Snitch “filter” does not get incoming packets from IPSEC VPNs and, therefore, cannot evaluate any rules over them. Their developers have filed a bug report with Apple but there has been no response. There is nothing they or Algo can do to resolve this problem on their own. You can read more about this problem in issue #134.

I can’t get my router to connect to the Algo server

In order to connect to the Algo VPN server, your router must support IKEv2, ECC certificate-based authentication, and the cipher suite we use. See the ipsec.conf files we generate in the config folder for more information. Note that we do not officially support routers as clients for Algo VPN at this time, though patches and documentation for them are welcome (for example, see open issues for Ubiquiti and pfSense).

I can’t get Network Manager to connect to the Algo server

You’re trying to connect Ubuntu or Debian to the Algo server through the Network Manager GUI but it’s not working. Many versions of Ubuntu and some older versions of Debian bundle a broken version of Network Manager without support for modern standards or the strongSwan server. You must upgrade to Ubuntu 17.04 or Debian 9 Stretch, each of which contain the required minimum version of Network Manager.

Various websites appear to be offline through the VPN

This issue appears occasionally due to issues with MTU size. Different networks may require the MTU to be within a specific range to correctly pass traffic. We made an effort to set the MTU to the most conservative, most compatible size by default but problems may still occur.

If either your Internet service provider or your chosen cloud service provider use an MTU smaller than the normal value of 1500 you can use the reduce_mtu option in the file config.cfg to correspondingly reduce the size of the VPN tunnels created by Algo. Algo will attempt to automatically set reduce_mtu based on the MTU found on the server at the time of deployment, but it cannot detect if the MTU is smaller on the client side of the connection.

If you change reduce_mtu you’ll need to deploy a new Algo VPN.

To determine the value for reduce_mtu you should examine the MTU on your Algo VPN server’s primary network interface (see below). You might algo want to run tests using ping, both on a local client when not connected to the VPN and also on your Algo VPN server (see below). Then take the smallest MTU you find (local or server side), subtract it from 1500, and use that for reduce_mtu. An exception to this is if you find the smallest MTU is your local MTU at 1492, typical for PPPoE connections, then no MTU reduction should be necessary.

Check the MTU on the Algo VPN server

To check the MTU on your server, SSH in to it, run the command ifconfig, and look for the MTU of the main network interface. For example:

ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1460

The MTU shown here is 1460 instead of 1500. Therefore set reduce_mtu: 40 in config.cfg. Algo should do this automatically.

Determine the MTU using ping

When using ping you increase the payload size with the “Don’t Fragment” option set until it fails. The largest payload size that works, plus the ping overhead of 28, is the MTU of the connection.

Example: Test on your Algo VPN server (Ubuntu)
$ ping -4 -s 1432 -c 1 -M do github.com
PING github.com (192.30.253.112) 1432(1460) bytes of data.
1440 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=1 ttl=53 time=13.1 ms

--- github.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 13.135/13.135/13.135/0.000 ms

$ ping -4 -s 1433 -c 1 -M do github.com
PING github.com (192.30.253.113) 1433(1461) bytes of data.
ping: local error: Message too long, mtu=1460

--- github.com ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

In this example the largest payload size that works is 1432. The ping overhead is 28 so the MTU is 1432 + 28 = 1460, which is 40 lower than the normal MTU of 1500. Therefore set reduce_mtu: 40 in config.cfg.

Example: Test on a macOS client not connected to your Algo VPN
$ ping -c 1 -D -s 1464 github.com
PING github.com (192.30.253.113): 1464 data bytes
1472 bytes from 192.30.253.113: icmp_seq=0 ttl=50 time=169.606 ms

--- github.com ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 169.606/169.606/169.606/0.000 ms

$ ping -c 1 -D -s 1465 github.com
PING github.com (192.30.253.113): 1465 data bytes

--- github.com ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss

In this example the largest payload size that works is 1464. The ping overhead is 28 so the MTU is 1464 + 28 = 1492, which is typical for a PPPoE Internet connection and does not require an MTU adjustment. Therefore use the default of reduce_mtu: 0 in config.cfg.

Change the client MTU without redeploying the Algo VPN

If you don’t wish to deploy a new Algo VPN (which is required to incorporate a change to reduce_mtu) you can change the client side MTU of WireGuard clients and Linux IPsec clients without needing to make changes to your Algo VPN.

For WireGuard on Linux, or macOS (when installed with brew), you can specify the MTU yourself in the client configuration file (typically wg0.conf). Refer to the documentation (see man wg-quick).

For WireGuard on iOS and Android you can change the MTU in the app.

For IPsec on Linux you can change the MTU of your network interface to match the required MTU. For example:

sudo ifconfig eth0 mtu 1440

To make the change take affect after a reboot, on Ubuntu 18.04 and later edit the relevant file in the /etc/netplan directory (see man netplan).

Note for WireGuard iOS users

As of WireGuard for iOS 0.0.20190107 the default MTU is 1280, a conservative value intended to allow mobile devices to continue to work as they switch between different networks which might have smaller than normal MTUs. In order to use this default MTU review the configuration in the WireGuard app and remove any value for MTU that might have been added automatically by Algo.

Clients appear stuck in a reconnection loop

If you’re using ‘Connect on Demand’ on iOS and your client device appears stuck in a reconnection loop after switching from WiFi to LTE or vice versa, you may want to try disabling DoS protection in strongSwan.

The configuration value can be found in /etc/strongswan.d/charon.conf. After making the change you must reload or restart ipsec.

Example command:

sed -i -e 's/#*.dos_protection = yes/dos_protection = no/' /etc/strongswan.d/charon.conf && ipsec restart

WireGuard: Clients can connect on Wifi but not LTE

Certain cloud providers (like AWS Lightsail) don’t assign an IPv6 address to your server, but certain cellular carriers (e.g. T-Mobile in the United States, EE in the United Kingdom) operate an IPv6-only network. This somehow leads to the Wireguard app not being able to make a connection when transitioning to cell service. Go to the Wireguard app on the device when you’re having problems with cell connectivity and select “Export log file” or similar option. If you see a long string of error messages like “Failed to send data packet write udp6 [::]:49727->[2607:7700:0:2a:0:1:354:40ae]:51820: sendto: no route to host then you might be having this problem.

Manually disconnecting and then reconnecting should restore your connection. To solve this, you need to either “force IPv4 connection” if available on your phone, or install an IPv4 APN, which might be available from your carrier tech support. T-mobile’s is available for iOS here under “iOS IPv4/IPv6 fix”, and here is a walkthrough for Android phones.

IPsec: Difficulty connecting through router

Some routers treat IPsec connections specially because older versions of IPsec did not work properly through NAT. If you’re having problems connecting to your AlgoVPN through a specific router using IPsec you might need to change some settings on the router.

Change the “VPN Passthrough” settings

If your router has a setting called something like “VPN Passthrough” or “IPsec Passthrough” try changing the setting to a different value.

Change the default pfSense NAT rules

If your router runs pfSense and a single IPsec client can connect but you have issues when using multiple clients, you’ll need to change the Outbound NAT mode to Manual Outbound NAT and disable the rule that specifies Static Port for IKE (UDP port 500). See Outbound NAT in the pfSense Book.

I have a problem not covered here

If you have an issue that you cannot solve with the guidance here, create a new discussion and ask for help. If you think you found a new issue in Algo, file an issue.

Building wheels for collected packages: M2Crypto, pycrypto
  Building wheel for M2Crypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dCCequ          
       cwd: /tmp/pip-install-wMjfxq/M2Crypto/                                   
  Complete output (52 lines):                                                   
  running bdist_wheel                                                           
  running build                                                                 
  running build_py                                                              
  copying M2Crypto/callback.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/Rand.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto            
  copying M2Crypto/Err.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/RSA.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-2.7/M2Crypto              
  copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-2.7/M2Crypto         
  copying M2Crypto/m2.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/EC.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-2.7/M2Crypto        
  copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/util.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/DSA.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/RC4.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/Engine.py -> build/lib.linux-x86_64-2.7/M2Crypto             
  copying M2Crypto/BN.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-2.7/M2Crypto          
  copying M2Crypto/six.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/X509.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/EVP.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/BIO.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/DH.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/threading.py -> build/lib.linux-x86_64-2.7/M2Crypto          
  creating build/lib.linux-x86_64-2.7/M2Crypto/SSL                              
  copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                      
  copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL         
  copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL     
  copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                              
  copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
  copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL 
  copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL   
  running build_ext                                                             
  building 'M2Crypto._m2crypto' extension                                       
  creating build/temp.linux-x86_64-2.7                                          
  creating build/temp.linux-x86_64-2.7/SWIG                                     
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -I/tmp/pip-install-wMjfxq/M2Crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.linux-x86_64-2.7/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations -DTHREADING       
  SWIG/_m2crypto_wrap.c:127:10: fatal error: Python.h: Нет такого файла или каталога                                                                             
    127 | #include <Python.h>                                                   
        |          ^~~~~~~~~~                                                   
  compilation terminated.                                                       
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1               
  ----------------------------------------                                      
  ERROR: Failed building wheel for M2Crypto
  Running setup.py clean for M2Crypto
  Building wheel for pycrypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/pycrypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/pycrypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-G5Fe32          
       cwd: /tmp/pip-install-wMjfxq/pycrypto/                                   
  Complete output (212 lines):                                                  
  running bdist_wheel                                                           
  running build                                                                 
  running build_py                                                              
  creating build                                                                
  creating build/lib.linux-x86_64-2.7                                           
  creating build/lib.linux-x86_64-2.7/Crypto                                    
  copying lib/Crypto/pct_warnings.py -> build/lib.linux-x86_64-2.7/Crypto       
  copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-2.7/Crypto           
  creating build/lib.linux-x86_64-2.7/Crypto/Hash                               
  copying lib/Crypto/Hash/MD2.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/MD4.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/hashalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Hash 
  copying lib/Crypto/Hash/HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/Hash     
  copying lib/Crypto/Hash/MD5.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/SHA.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Hash 
  creating build/lib.linux-x86_64-2.7/Crypto/Cipher                             
  copying lib/Crypto/Cipher/AES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher  
  copying lib/Crypto/Cipher/blockalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                             
  copying lib/Crypto/Cipher/Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                              
  copying lib/Crypto/Cipher/PKCS1_OAEP.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                            
  copying lib/Crypto/Cipher/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                            
  copying lib/Crypto/Cipher/DES3.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  copying lib/Crypto/Cipher/CAST.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  copying lib/Crypto/Cipher/ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  copying lib/Crypto/Cipher/DES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher  
  copying lib/Crypto/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                              
  copying lib/Crypto/Cipher/XOR.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher  
  copying lib/Crypto/Cipher/ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  creating build/lib.linux-x86_64-2.7/Crypto/Util                               
  copying lib/Crypto/Util/py21compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/randpool.py -> build/lib.linux-x86_64-2.7/Crypto/Util 
  copying lib/Crypto/Util/number.py -> build/lib.linux-x86_64-2.7/Crypto/Util   
  copying lib/Crypto/Util/asn1.py -> build/lib.linux-x86_64-2.7/Crypto/Util     
  copying lib/Crypto/Util/Counter.py -> build/lib.linux-x86_64-2.7/Crypto/Util  
  copying lib/Crypto/Util/RFC1751.py -> build/lib.linux-x86_64-2.7/Crypto/Util  
  copying lib/Crypto/Util/_number_new.py -> build/lib.linux-x86_64-2.7/Crypto/Util                                                                               
  copying lib/Crypto/Util/py3compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Util 
  creating build/lib.linux-x86_64-2.7/Crypto/Random                             
  copying lib/Crypto/Random/random.py -> build/lib.linux-x86_64-2.7/Crypto/Random
  copying lib/Crypto/Random/_UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/Random                                                                      
  copying lib/Crypto/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random                                                                              
  creating build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                     
  copying lib/Crypto/Random/Fortuna/FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                      
  copying lib/Crypto/Random/Fortuna/FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                    
  copying lib/Crypto/Random/Fortuna/SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                               
  copying lib/Crypto/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                              
  creating build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                       
  copying lib/Crypto/Random/OSRNG/rng_base.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                  
  copying lib/Crypto/Random/OSRNG/fallback.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                  
  copying lib/Crypto/Random/OSRNG/nt.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                        
  copying lib/Crypto/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                  
  copying lib/Crypto/Random/OSRNG/posix.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                     
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest                           
  copying lib/Crypto/SelfTest/st_common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest                                                                         
  copying lib/Crypto/SelfTest/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest                                                                          
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                    
  copying lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                     
  copying lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                       
  copying lib/Crypto/SelfTest/Cipher/test_DES3.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/test_ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/test_DES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  copying lib/Crypto/SelfTest/Cipher/test_Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                       
  copying lib/Crypto/SelfTest/Cipher/test_AES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  copying lib/Crypto/SelfTest/Cipher/test_ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                              
  copying lib/Crypto/SelfTest/Cipher/test_XOR.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  copying lib/Crypto/SelfTest/Cipher/test_CAST.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                      
  copying lib/Crypto/SelfTest/Hash/test_HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                               
  copying lib/Crypto/SelfTest/Hash/test_SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_MD5.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                  
  copying lib/Crypto/SelfTest/Hash/test_SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_MD4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/test_SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_SHA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/test_SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/test_MD2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                  
  copying lib/Crypto/SelfTest/Protocol/test_AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                               
  copying lib/Crypto/SelfTest/Protocol/test_rfc1751.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                    
  copying lib/Crypto/SelfTest/Protocol/test_chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                   
  copying lib/Crypto/SelfTest/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                        
  copying lib/Crypto/SelfTest/Protocol/test_KDF.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                        
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                 
  copying lib/Crypto/SelfTest/PublicKey/test_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                      
  copying lib/Crypto/SelfTest/PublicKey/test_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                      
  copying lib/Crypto/SelfTest/PublicKey/test_importKey.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                
  copying lib/Crypto/SelfTest/PublicKey/test_ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                  
  copying lib/Crypto/SelfTest/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                      
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                    
  copying lib/Crypto/SelfTest/Random/test_rpoolcompat.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                                    
  copying lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                               
  copying lib/Crypto/SelfTest/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                                            
  copying lib/Crypto/SelfTest/Random/test_random.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                                         
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna            
  copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                               
  copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                             
  copying lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                                        
  copying lib/Crypto/SelfTest/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                                            
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG              
  copying lib/Crypto/SelfTest/Random/OSRNG/test_posix.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                              
  copying lib/Crypto/SelfTest/Random/OSRNG/test_nt.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                                 
  copying lib/Crypto/SelfTest/Random/OSRNG/test_generic.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                            
  copying lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                          
  copying lib/Crypto/SelfTest/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                                
  copying lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                           
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                      
  copying lib/Crypto/SelfTest/Util/test_asn1.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                               
  copying lib/Crypto/SelfTest/Util/test_number.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                             
  copying lib/Crypto/SelfTest/Util/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                          
  copying lib/Crypto/SelfTest/Util/test_Counter.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                            
  copying lib/Crypto/SelfTest/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                                
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                 
  copying lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                                                
  copying lib/Crypto/SelfTest/Signature/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                                                 
  copying lib/Crypto/SelfTest/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                                                      
  creating build/lib.linux-x86_64-2.7/Crypto/Protocol                           
  copying lib/Crypto/Protocol/KDF.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                               
  copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                          
  copying lib/Crypto/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                          
  copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                      
  creating build/lib.linux-x86_64-2.7/Crypto/PublicKey                          
  copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                             
  copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                         
  copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                          
  copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                            
  copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                            
  copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                             
  copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                       
  copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                        
  creating build/lib.linux-x86_64-2.7/Crypto/Signature                          
  copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Signature                                                                      
  copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-x86_64-2.7/Crypto/Signature                                                                       
  copying lib/Crypto/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Signature                                                                        
  running build_ext                                                             
  running build_configure                                                       
  checking for gcc... gcc                                                       
  checking whether the C compiler works... yes                                  
  checking for C compiler default output file name... a.out                     
  checking for suffix of executables...                                         
  checking whether we are cross compiling... no                                 
  checking for suffix of object files... o                                      
  checking whether we are using the GNU C compiler... yes                       
  checking whether gcc accepts -g... yes                                        
  checking for gcc option to accept ISO C89... none needed                      
  checking for __gmpz_init in -lgmp... yes                                      
  checking for __gmpz_init in -lmpir... no                                      
  checking whether mpz_powm is declared... yes                                  
  checking whether mpz_powm_sec is declared... yes                              
  checking how to run the C preprocessor... gcc -E                              
  checking for grep that handles long lines and -e... /usr/bin/grep             
  checking for egrep... /usr/bin/grep -E                                        
  checking for ANSI C header files... yes                                       
  checking for sys/types.h... yes                                               
  checking for sys/stat.h... yes                                                
  checking for stdlib.h... yes                                                  
  checking for string.h... yes                                                  
  checking for memory.h... yes                                                  
  checking for strings.h... yes                                                 
  checking for inttypes.h... yes                                                
  checking for stdint.h... yes                                                  
  checking for unistd.h... yes                                                  
  checking for inttypes.h... (cached) yes                                       
  checking limits.h usability... yes                                            
  checking limits.h presence... yes                                             
  checking for limits.h... yes                                                  
  checking stddef.h usability... yes                                            
  checking stddef.h presence... yes                                             
  checking for stddef.h... yes                                                  
  checking for stdint.h... (cached) yes                                         
  checking for stdlib.h... (cached) yes                                         
  checking for string.h... (cached) yes                                         
  checking wchar.h usability... yes                                             
  checking wchar.h presence... yes                                              
  checking for wchar.h... yes                                                   
  checking for inline... inline                                                 
  checking for int16_t... yes                                                   
  checking for int32_t... yes                                                   
  checking for int64_t... yes                                                   
  checking for int8_t... yes                                                    
  checking for size_t... yes                                                    
  checking for uint16_t... yes                                                  
  checking for uint32_t... yes                                                  
  checking for uint64_t... yes                                                  
  checking for uint8_t... yes                                                   
  checking for stdlib.h... (cached) yes                                         
  checking for GNU libc compatible malloc... yes                                
  checking for memmove... yes                                                   
  checking for memset... yes                                                    
  configure: creating ./config.status                                           
  config.status: creating src/config.h                                          
  building 'Crypto.PublicKey._fastmath' extension                               
  creating build/temp.linux-x86_64-2.7                                          
  creating build/temp.linux-x86_64-2.7/src                                      
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/include/python2.7 -c src/_fastmath.c -o build/temp.linux-x86_64-2.7/src/_fastmath.o                                              
  src/_fastmath.c:31:10: fatal error: Python.h: Нет такого файла или каталога   
     31 | #include "Python.h"                                                   
        |          ^~~~~~~~~~                                                   
  compilation terminated.                                                       
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1               
  ----------------------------------------                                      
  ERROR: Failed building wheel for pycrypto
  Running setup.py clean for pycrypto
Failed to build M2Crypto pycrypto
Installing collected packages: M2Crypto, pyminifier, xlwt, xlrd, xlutils, pycrypto
    Running setup.py install for M2Crypto ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-VErJNw/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/M2Crypto                                              
         cwd: /tmp/pip-install-wMjfxq/M2Crypto/                                 
    Complete output (55 lines):                                                 
    running install                                                             
    running build                                                               
    running build_py                                                            
    creating build                                                              
    creating build/lib.linux-x86_64-2.7                                         
    creating build/lib.linux-x86_64-2.7/M2Crypto                                
    copying M2Crypto/callback.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/Rand.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto          
    copying M2Crypto/Err.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/RSA.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-2.7/M2Crypto            
    copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-2.7/M2Crypto       
    copying M2Crypto/m2.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/EC.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-2.7/M2Crypto      
    copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/util.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/DSA.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/RC4.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/Engine.py -> build/lib.linux-x86_64-2.7/M2Crypto           
    copying M2Crypto/BN.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-2.7/M2Crypto        
    copying M2Crypto/six.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/X509.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/EVP.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/BIO.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/DH.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/threading.py -> build/lib.linux-x86_64-2.7/M2Crypto        
    creating build/lib.linux-x86_64-2.7/M2Crypto/SSL                            
    copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                    
    copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL       
    copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL   
    copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                            
    copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL 
    running build_ext                                                           
    building 'M2Crypto._m2crypto' extension                                     
    creating build/temp.linux-x86_64-2.7                                        
    creating build/temp.linux-x86_64-2.7/SWIG                                   
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -I/tmp/pip-install-wMjfxq/M2Crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.linux-x86_64-2.7/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations -DTHREADING     
    SWIG/_m2crypto_wrap.c:127:10: fatal error: Python.h: Нет такого файла или каталога                                                                           
      127 | #include <Python.h>                                                 
          |          ^~~~~~~~~~                                                 
    compilation terminated.                                                     
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1             
    ----------------------------------------                                    
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-VErJNw/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/M2Crypto Check the logs for full command output.                                                      
cat: /etc/lsb-release: Нет такого файла или каталога
cat: /etc/lsb-release: Нет такого файла или каталога
cat: /etc/lsb-release: Нет такого файла или каталога
cat: /etc/lsb-release: Нет такого файла или каталога
ls: невозможно получить доступ к '/opt/microsoft/powershell/*/DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY': Нет такого файла или каталога

Я пытаюсь установить PyCrypto 2.6 библиотека на моем компьютере. Но я продолжаю получать следующую ошибку

D:SoftwarePythonpackagepycrypto-2.6>python setup.py build
running build
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

building 'Crypto.Random.OSRNG.winrandom' extension
error: Unable to find vcvarsall.bat

моя система
Windows 8 Pro 64-разрядная, Visual Studio Enterprise 2012 и Python 3.3

чтобы исправить ошибку, я попытался установить переменную окружения VS90COMNTOOLS=%VS110COMNTOOLS% Как сообщили fmuecke в ошибке post: не удалось найти vcvarsall.летучая мышь!—4—> но это не сработало для меня.

может кто-нибудь посоветовать мне, как это исправить ошибка.

FYI, я не устанавливаю vc2008 и т. д..

7 ответов


мне удалось установить PyCrypto 2.6 с помощью стандартные бинарные для Питон3.3 С Модули Python Voidspace.

Это на самом деле не исправить error: Unable to find vcvarsall.bat для другого пакета, у которого нет готовых двоичных файлов.

однако это устраняет необходимость создания пакета PyCrypto, позволяя мне установить PyCrypto в моей системе без получения ошибки.




3

автор: MordicusEtCubitus


вы можете установить mingw64, а затем запустить из каталога распакованных файлов PyCrypto:

python setup.py build —compiler=mingw32


Я использую Windows 10-Все, что мне нужно было сделать, это обновить мою систему с помощью Visual C++ Build Tools 2015, который я нашел на этой странице: https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/

о середине страницы, вы увидите некоторые параметры загрузки-выберите версию python и загрузите правильный пакет

затем я повторно импортировал программу, которую я пытался установить, и больше никаких ошибок! Ура!


Если вы не
VS 2010

УСТАНОВИТЬ VS90COMNTOOLS=%VS100COMNTOOLS%

VS 2012

УСТАНОВИТЬ VS90COMNTOOLS=%VS110COMNTOOLS%

VS 2013

УСТАНОВИТЬ VS90COMNTOOLS=%VS120COMNTOOLS%

и затем
python setup.py установить


I’m using Python 3.7 and Windows 10. ‘pip install pycrypto‘ doesn’t work with the following error:

(pyramid) C:ProjectsPyramid>pip install pycrypto
Collecting pycrypto
  Downloading https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446kB)
    100% |████████████████████████████████| 450kB 5.7MB/s
Installing collected packages: pycrypto
  Running setup.py install for pycrypto ... error

...
... purposely truncated
...    

    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(26): error C2061: syntax error: identifier 'intmax_t'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(27): error C2061: syntax error: identifier 'rem'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(27): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(28): error C2059: syntax error: '}'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(30): error C2061: syntax error: identifier 'imaxdiv_t'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(30): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(40): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(41): error C2146: syntax error: missing ')' before identifier '_Number'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(41): error C2061: syntax error: identifier '_Number'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(41): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(42): error C2059: syntax error: ')'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(45): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(46): error C2146: syntax error: missing ')' before identifier '_Numerator'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(46): error C2061: syntax error: identifier '_Numerator'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(46): error C2059: syntax error: ';'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(46): error C2059: syntax error: ','
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(48): error C2059: syntax error: ')'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(50): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(56): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(63): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(69): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(76): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(82): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(89): error C2143: syntax error: missing '{' before '__cdecl'
    C:Program Files (x86)Windows Kits10include10.0.10240.0ucrtinttypes.h(95): error C2143: syntax error: missing '{' before '__cdecl'
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:pythonvenvpyramidscriptspython.exe -u -c "import setuptools, tokenize;__file__='C:\Users\dariawan\AppData\Local\Temp\pip-install-wwb9aboq\pycrypto\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersdariawanAppDataLocalTemppip-record-x5wxv2qginstall-record.txt --single-version-externally-managed --compile --install-headers c:pythonvenvpyramidincludesitepython3.7pycrypto" failed with error code 1 in C:UsersdariawanAppDataLocalTemppip-install-wwb9aboqpycrypto

The file includepyport.h in Python installation directory does not have #include < stdint.h > anymore. This leaves intmax_t undefined.

A workaround for Microsoft VC compiler is to force include stdint.h via OS environment variable CL:

  • Open command prompt, and Setup VC environment by runing vcvars*.bat (choose file name depending on VC version and architecture)
C:Program Files (x86)Microsoft Visual Studio 14.0VC>vcvarsall.bat

  • set CL=-FI»Full-Pathstdint.h» (use real value for Full-Path for the environment)
C:Program Files (x86)Microsoft Visual Studio 14.0VC>set CL=-FI"%VCINSTALLDIR%INCLUDEstdint.h"

  • then, try to install pycrypto again:
(pyramid) C:ProjectsPyramid>pip install pycrypto
Collecting pycrypto
  Using cached https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz
Installing collected packages: pycrypto
  Running setup.py install for pycrypto ... done
Successfully installed pycrypto-2.6.1

Another option that I’ll try in future is to use PyCryptodome instead of pycrypto. pycrypto is discontinued and is no longer actively supported. PyCryptodome exposes almost the same API as pycrypto (source).

Reference: Microsoft Windows Python-3.6 PyCrypto installation error

Понравилась статья? Поделить с друзьями:
  • Building wheel for hiredis setup py error
  • Building wheel for dlib setup py error
  • Building wheel for cryptography pep 517 error
  • Building wheel for cffi setup py finished with status error
  • Build info client auth error