Pip config debug (global, site, user aren't existe)

I’m trying to install a requirements.txt to my project. Error came out as follows:

error: subprocess-exited-with-error
 × pip subprocess to install build dependencies did not run successfully.

Then I debug my pip: (global, site, user aren’t existe!)

Can anyone help config the environment or fix the problem? I had spent a few days working on it but made no progress. Many thanks!

FYI: pip --v 24.0 python --v 3.11.8

Messages like this are telling you that the problem is not because of Pip.

When Pip installs a package, sometimes it can’t get a ready “wheel” with all of the files and clear instructions about where to put them. Sometimes it has to build the project locally - for example, because the Python code in that package will communicate with C code, which has to be separately compiled on your computer.

When this happens, Pip may ask the computer to run a C compiler, or other programs like that. And sometimes that can go wrong - for example, because you don’t have a C compiler, or Pip doesn’t know where to find it, or it isn’t suitable for compiling the code for some other reason, or because you’re missing some other dependency.

In these cases, you should start by reading the documentation for the thing you’re trying to install.

Regardless, it’s not really necessary to have config files for Pip anywhere. I don’t have any, and Pip works just fine. You should read the documentation for Pip in order to understand what these config files are for, what you can write in them, and why you might want one.

There is nothing here to suggest anything is wrong with Pip. In order to help, we need to understand what you are trying to install (what it says in the requirements.txt, and why you are trying to use it - is this your own project?), and see complete output.

1 Like

Thanks Karl! It helped! The main reason is that the things in requirements.txt are low versions, which are incompatible with the latest Python. I updated all of them and installed them successfully.

However, I have another question. Before, I manually modified several things. I’m not sure if these changes will create any interruptions in the future. If you have any ideas, please let me know. Thank you for your patience with the beginner.

  1. I removed the global.target path for pip (I thought it was the error).
  2. I changed the permissions for Users and ALL APPLICATION PACKAGES to full control permissions.
  3. I mkdir C:\ProgramData\pip\pip.ini

The following is my current pip config:

  C:\ProgramData\pip\pip.ini, exists: True
  C:\Program Files\Python311\pip.ini, exists: False
  C:\Users\Admin\pip\pip.ini, exists: False
  C:\Users\Admin\AppData\Roaming\pip\pip.ini, exists: True