Pycrypto python 3.5--turn

Source: Internet
Author: User

Original address: https://gxnotes.com/article/198426.html

Problem description

I found some pycrypto installers for Python 3.3 and 3.4, but not any Python 3.5.

When I try to use pip install the install Pycrypton, it says:

or MPIR library not found; Not building Crypto.PublicKey._fastmath.  

Is there a way to install Pycrypto on Python 3.5 in Windows 10? Thank you!

The best solution for your ideas

This warning should not stop building, and it is more likely that you are missing the visual Studio 2015 compiler that built the binary extension (pycrypto). See Python Packaging User Guide for the compiler you need for your Python version.

The reason you need the compiler is that Pycrypto only provides formal source code distribution. So, you have two options for installing Pycrypto:

Build from Source:

This is actually quite simple, but it needs to install some extra software. Once again, refer to the Python Wrapper user guide above, and find the right compiler for your Python version. I think you can install Python-related compilers only if you install a custom installation of Visual Studio.

Then, after the installation is complete, you may have to restart the computer, you should be able to run pip install pycrypto it easily, and Pip will download the source and compile it for you.

If you also have a wheel ( pip install wheel ) installed, Pip will create a wheel from the source and cache it, which is how I created the wheel I shared in option 2.

2. Installing a built-in release from a third party

I happen to be a third party and a shared wheel compiled for Pycrypto 2.6.1 W/python 3.5 for 32-bit and 64-bit Windows on my GitHub repo. I included the installation instructions in this repo Readme file.

If you are looking for an older version of Python and/or Pycrypto's built-in distribution, I also link to voidspace in my repo Readme file (sorry, I'm limited to 2 links here).

Second best solution to the idea

Use Pycryptodome instead! It is a project that remains (June 2017), including Python 3.xx's pycrypto feature (it works for me on Python 3.6)

Project page:

Https://www.pycryptodome.org/en/latest/index.html

Reference documents
    • Pycrypto on Python 3.5

Pycrypto python 3.5--turn

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.