Microsoft Windows Python-3.6 PyCrypto installation error

后端 未结 8 2162
陌清茗
陌清茗 2020-11-29 00:30

pip install pycrypto works fine with python3.5.2 but fails wiht python3.6 with the following error:

inttypes.h(26): error C2061: syntax e

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 00:47

    For me this fixes it:

    with Python 2, I have

    sudo apt-get install python-dev  \
         build-essential libssl-dev libffi-dev \
         libxml2-dev libxslt1-dev zlib1g-dev \
         ...
    

    with Python 3, I need

    sudo apt-get install python3 python-dev python3-dev \
         build-essential libssl-dev libffi-dev \
         ...
    

    Installing python-dev python3-dev fixes it for me!

提交回复
热议问题