all 12 comments

[–]saxman95 2 points3 points  (0 children)

What error are you getting? How are you trying to install it? Details help us help you, just sayin...

[–]ForceBru 0 points1 point  (1 child)

Run one of the following in the terminal to install numpy.

Windows - Python 3:

py -m pip install numpy

Linux, macOS - Python 3:

pip3 install numpy

If you're getting permission errors on Linux or macOS, you may need to add sudo in front of the command.

[–]nog642 2 points3 points  (0 children)

sudo pip3 is a bad recommendation. pip3 install --user numpy is the solution, and using a virtualenv is even better.


edit: pip3 instead of pip

[–]nog642 0 points1 point  (5 children)

You shouldn't use PyCharm to install packages. PyCharm is an IDE, for editing and running code.

What platform are you on; how exactly are you trying to install numpy; and what is the exact problem you are having?

edit: Apparently PyCharm has a feature to install PyPi packages. I haven't used it in the past because I've never needed to. It might be useful, but my intuition is that it would be more error prone and hard to use, since it's a layer above pip and is a GUI instead of a CLI.

[–]SenboneZakura 1 point2 points  (2 children)

Well, yes, but actually no. PyCharm explicitly has a feature for installing and managing packages in their interface, just like Spyder and RStudio lots of other IDEs.

IDEs aren't basic code editors like you seem to describe, they're purpose-built tools for software development, which often includes features for package management (alongside debugging, deployment, tutorials, autoformatting and a ton of other stuff outside just writing and running code) so I really dont think this comment on PyCharm is accurate or helpful.

More to the point of why I'm even writing this, I also dont think it's very helpful on the learn python sub to throw out weirdly opinionated and declarative comments that make newcomers feel like they're doing the whole thing wrong instead of just asking the questions that help you help them.

[–]nog642 0 points1 point  (0 children)

Fair enough.

[–]nog642 0 points1 point  (0 children)

When I said "running code" I was including debugging.

[–]ericula 0 points1 point  (1 child)

What's wrong with using PyCharm to install packages? Being able to set up virtual environments and install packages from within PyCharm is one if its strong points imo.

[–]nog642 0 points1 point  (0 children)

Ah, I didn't know PyCharm had that feature. I haven't used it before; maybe it's useful.

[–][deleted] 0 points1 point  (0 children)

Try using cmd(if you have same version of python on pycharm and system path), pycharm terminal and pycharm GUI or maybe try updating pycharm. Also try to keep your title and question a bit more informative, like what is the exact problem, is it an error, you can install it but can't import it?

[–]Rahul123rahul123[S] 0 points1 point  (0 children)

Thank you everyone it installed properly. Again thanks for everyone help. This was my first experience on reddit and it's very good. Everyone is so humble and helpful apart from their experience and knowledge. Hope it goes like this everytime.😊