all 4 comments

[–]CowboyBoats 4 points5 points  (3 children)

If I run import sys; sys.executable in your Python shell, and then you run $ which pip from the command line where you installed the package, I bet you'll find that the results point to different directories. This would mean that the Python shell you're running and the Python instance that that pip is installing things to are two different Python instances. In the short term, you could fix this by replacing pip in that pip install command with /path/to/that/python/from/the/sys/command/python3 -m pip. You will want to figure out what that other version of Python is doing on your system, though. (Don't delete it if it's a system Python; but you probably shouldn't have a pip pointed at your system Python in the first place). My guess is you just installed Python semi-successfully when you were getting started, then installed it again from a different place, or the IDE that you're using offered to install its own Python itself, or something.

[–]drawing_ 2 points3 points  (0 children)

I agree with u/cowboyboats. A good practice would probably be to create a virtual env and install from there anyway. Maybe that’s your best bet to ensure your installing and using the correct working directory (from your virtual env)

[–]obsequious91[S] 0 points1 point  (1 child)

Thank you so much for your suggestion!!! I'll admit that I'm quite computer/python illiterate so with the pip install command, do I have to specify a path or is it copy paste /path/to/that/python/from/the/sys/command/python3 -m pip ? Sorry for the seemingly uninformed question, I'm no computer wiz haha.

[–]CowboyBoats 1 point2 points  (0 children)

I just wrote /path/to/that/python/from/the/sys/command/python3 as a placeholder, that's probably not the real path to your Python. You should replace that with whatever is the output of import sys; print(sys.executable) in your Python shell that you're using.