Home > Net >  Installing Numpy on PyCharm (Linux)
Installing Numpy on PyCharm (Linux)

Time:12-25

I have been trying since morning to make this right and just learn maths! but no! Can someone please help me with this?

EDIT: What I have been trying to do (video GIF): enter image description here

enter image description here

CodePudding user response:

Try doing this in your terminal:

sudo apt-get install python3-distutils

sudo apt-get install python3-apt

and then:

sudo apt-get install --reinstall numpy

CodePudding user response:

I solved it on my own. I had multiple versions of Python downloaded and that might have caused the problem. So, I restored PyCharm to it's default settings by going to

File--->Manage IDE Settings--->Restore Default Settings

I am pretty sure I had not chosen the right base interpreter previous time, but this time I choose base interpreter

/usr/bin/python3.10

(the highest installed in my system)

and clicked on

*Inherit global site-packages

*Make available to all packages

New Project config that worked

and I let all the packages which needed to be downloaded to be downloaded. And, that's about it. It worked. Now I can import numpy or any other packages or add packages to my project.

This was trial and error. I don't know what caused what, if someone does know, edits will be welcome.

  • Related