Home > Net >  Pip Install Troubles
Pip Install Troubles

Time:06-20

Currently trying to get python up and working on my work laptop which has proven to be a huge pain in the you know what.

It seems like the PATHing is all screwed up even with pip installing packages. For example, I tried to install seaborn today via pip install seaborn which ran successfully but when I try to import it on Visual Studio it has the yellow squiggly underneath it. I try to reinstall it but it says it has already been satisfied.

Is there anyway to manually re-route all of my python libraries to where I actually know whats going on? I have the PATH set to the correct library in environment variables but it still does not read that I have seaborn installed.

Any help is greatly appreciated.

CodePudding user response:

You can create python virtual environment and install your libraries on it.

https://linuxize.com/post/how-to-create-python-virtual-environments-on-ubuntu-18-04/

It creates a isolated area for your specific project.

CodePudding user response:

It sounds like you might have different python installations on your system.
If that's the case it might also be the case that the python you are using in visual studio isn't the python that is packages are being installed for via a straight forward pip command.

You could try to instead of pip install ... call python -m pip install .... That ensures that you are using the pip of the python installation

CodePudding user response:

I recommend you to install all dependencies (seaborn, pandas, numpy, matplotlib, etc) in a virtual environment, that means that you can have its own independent set of installed Python packages in its environment.

See here the python documentation on how to work with virtual environments on different OS.

Also, check which python versions you have installed on your machine. If you have both python2 and python3, use pip3 and python3 on terminal whenever you want to install or run something.

  • Related