Pip error: Microsoft Visual C++ 14.0 is required

后端 未结 8 1913
离开以前
离开以前 2020-11-22 09:58

I just ran the following command:

pip install -U steem

and the installation worked well until it failed to install pycrypto. Aft

8条回答
  •  孤独总比滥情好
    2020-11-22 10:34

    You need to install Microsoft Visual C++ 14.0 to install pycrypto:

    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
    C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
    

    In the comments you ask which link to use. Use the link to Visual C++ 2015 Build Tools. That will install Visual C++ 14.0 without installing Visual Studio.

    In the comments you ask about methods of installing pycrypto that do not require installing a compiler. The binaries in the links appear to be for earlier versions of Python than you are using. One link is to a binary in a DropBox account.

    I do not recommend downloading binary versions of cryptography libraries provided by third parties. The only way to guarantee that you are getting a version of pycrypto that is compatible with your version of Python and has not been built with any backdoors is to build it from the source.

    After you have installed Visual C++, just re-run the original command:

    pip install -U steem
    

    To find out what the various install options mean, run this command:

    pip help install
    

    The help for the -U option says

    -U, --upgrade        Upgrade all specified packages to the newest available
                         version. The handling of dependencies depends on the
                         upgrade-strategy used.
    

    If you do not already have the steem library installed, you can run the command without the -U option.

提交回复
热议问题