Joseph
Joseph

Reputation: 148

Using pip to install libraries, then the libraries aren't found

I'm quite new to programming, and I am trying to progress beyond Python's built-in libraries. When I tried to pip install pandas it seemed to work fine, but then when I attempted to use it I got an ImportError message: "No Module names 'pandas'". Am I missing something really obvious here?

Extra details: Python 3.6.0, Windows 10 home 64-bit, Asus Zenbook UX305, Accessing the internet from China. This is a screenshot showing my pip install of pandas and the readout from Thonny telling me "No Module names 'pandas'"

Upvotes: 0

Views: 1801

Answers (1)

Meghdeep Ray
Meghdeep Ray

Reputation: 5537

You need to specify the Python version. There are a few ways of doing this.

  • python3 -m pip install pandas
  • pip3 install pandas
  • <full-path-to-python> -m pip install pandas

python3 -m pip install indicates that Python3's pip needs to be used for the installation, pip3 also implies the same.

Post installation the best way to check if it's working or not is to open the basic Python shell in the terminal and trying to import it. If that works then you will know it is an issue with the configuration of the IDE you're using.

When using 3rd party IDEs like Thorny, many times they will have their own versions of Python which could throw things off. You would have to change the configuration to use your original Python in that case.

Upvotes: 1

Related Questions