-1

After installing python, I had an issue in IDE where my pip version (21.1) was not in the sync with my local system's version(23.1) so I was not able to import any libraries. Eventually I fixed the issue by typing python -m pip install -U --force-reinstall pip into my project's virtual enviroment.

However in the process of trying to fix the issue I reinstalled both pip and python once again which let me to having a new error "No module named pip__main__; 'pip' is a package and cannot be directly executed". I fixed that error by manually deleting pip folders on my laptop and reinstalling pip.

Now, everything seemed fine, the pip version of my project was up to date with my local system's, no "No module named pip__main__; 'pip' is a package and cannot be directly executed" errors but I am still unable to get numpy to install.

Specifically I get thrown this error: "note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error" and "distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module".

Through my research, I have seen someone mentioned it is a compiler error and that I should install the Microsoft compiler tools, but I have aleady done that (https://i.stack.imgur.com/bF2ck.png).

Funnily enough it works in my python idle though (https://i.stack.imgur.com/gxSms.png)

My python is 3.9.13

Ursula
  • 1

1 Answers1

0

I don't know where are you trying to run python (Which is your OS?). This is important, because, in Windows some times you need to install the cpp build tools from Microsoft see this related. Numpy is written in C in the deep.

Also, It would be better if you use virtualenv, venv or pipenv directly through your terminal for each project to manage the python environments, this is because in this way you can control it better and you understand what is happening behind scenes

However, I advise you to start using the terminal to interact with python, and run your scripts or apps. I know it may sound difficult, but trust me with time you will realize it make you a better developer