I keep getting errors when installing pip

Asked 1 years ago, Updated 1 years ago, 153 views

I always get this error when I say pip install -r requirements.txt. Please help me.

cmd window pip install python

2022-09-21 16:56

1 Answers

The error is caused by installing pilot 6.1.0 on Python 3.8 (64-bit).

If you take a closer look at the message, you will receive a pilot-6.1.0.tar file and try to install it, but you will often need a c compiler during installation because you will receive a package source instead of a platform (operating system, bit count). (For packages made up of Python files only, you don't need compilation, so it's almost easy to download.)

Windows usually do not have the default c/cpp compiler, which causes errors. If you look at the message below, you will see a compiler execution command in the visual studio path to compile into the vc compiler.

So, what's the solution?

In this case, because the requirements.txt specifies the version of pillow, it is an attempt to install a slightly older version of the pillow package, and if you erase the version number part and try it, it is downloaded from Python 3.8-64 for Windows to the pillow package whl version and installed well.

Requirements.txt is to match the environment in which the source was developed, i.e., the packages used, the versions of each package, etc. Since the pillow is not a package that changes the API significantly depending on the version, it won't be too bad to just match the latest version.

The concept of errors that occur when installing basic Python packages is as above.

Looking at it carefully, it seems to be caused by installing pyrypto, but the installation may be a bit tricky. I'll try it, and maybe I should refer to the following link and install the compiler. Good luck.

https://www.dariawan.com/tutorials/python/python-3-install-pycrypto-windows/


2022-09-21 16:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.