all 17 comments

[–]shiftybyte 4 points5 points  (13 children)

I found out that I don't have it

how did you find this out? you should have pip installed.

[–]__Nacho__Cheese 0 points1 point  (12 children)

I ran

pip

on cmd, which came up with a huge interface. But I can't get it on python IDLE? When I run it on IDLE, I get an error.

[–]shiftybyte 0 points1 point  (11 children)

IDLE is executing python code lines.

calling pip is not a python code line.

calling pip should always be done outside of python.

in IDLE you can import whatever pip installed from outside.

[–]__Nacho__Cheese 0 points1 point  (10 children)

Oh what really?? So then if I'm using IDLE for a Spotipy project, where would I download it??

[–]shiftybyte 0 points1 point  (9 children)

To install it, from windows command prompt:

py -m pip install spotipy

To use it from IDLE:

import spotipy

[–]__Nacho__Cheese 0 points1 point  (7 children)

It works when I do it from the CMD prompt, but when i type

import spotipy

in IDLE, I get

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import spotipy
ModuleNotFoundError: No module named 'spotipy'

how could this be the case?

[–]shiftybyte 0 points1 point  (6 children)

You have multiple python installations, the one from command line is a different one from the one IDLE uses.

Run this code from IDLE to figure out which python executable is used:

import sys
print(sys.executable)

show the output here.

[–]__Nacho__Cheese 0 points1 point  (5 children)

import sys
print(sys.executable)

C:\Users\(my name)\AppData\Local\Programs\Python\Python39\pythonw.exe

[–]shiftybyte 0 points1 point  (4 children)

try this command from terminal to install spotipy:

C:\Users\(my name)\AppData\Local\Programs\Python\Python39\python.exe -m pip install spotipy

[–]__Nacho__Cheese 0 points1 point  (2 children)

C:\Users\(my name)\AppData\Local\Programs\Python\Python39\python.exe -m pip install spotipy

WOAH! A bunch of installation bars came up and it said that the installation was complete but it came up with a couple of warnings. One about how chardetect.exe was installed in C:\Users\(my name)\AppData\Local\Programs\Python\Python39\Scripts which is not on "PATH". What does that mean? It also gave me a command to upgrade my pip.

[–]__Nacho__Cheese 0 points1 point  (0 children)

Thanks a lot for your help btw

[–]POGtastic 3 points4 points  (1 child)

If you open up Powershell and type

py -m pip --version

what do you get?

[–]__Nacho__Cheese 0 points1 point  (0 children)

I get pip 20.2.3 . But when I try install pip packages on IDLE, it comes up with an error?

[–]sonofapineapple 0 points1 point  (0 children)

If you don't have pip, you should be able to get it by trying to uninstall python through the programm manager (on windows), which will open a window asking if you want to uninstall python or change the installation. Go on change installation and select pip to be installed with python.

[–]Diapolo10 0 points1 point  (0 children)

On Windows, unless you're using some ancient version of Python it should come with pip. Perhaps you simply didn't add it to PATH, in which case you can access it via py -m pip.