[GH-ISSUE #777] Python isn't recognizing module install #475

Closed
opened 2026-02-27 23:22:50 +03:00 by kerem · 5 comments
Owner

Originally created by @gehuskic on GitHub (Jan 31, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/777

Bug

Python is giving back errors that module spotipy does not exist. I tried installing the module multiple times with pip but nothing seems to make it work.

pip install spotipy
pip3 install spotipy

I even tried playing around with the 'setup.py' file.

batch:
python setup.py build
python setup.py build_py
python setup.py install
python setup.py install_lib

For some reason on the command prompt I do not get any issues importing the module, only when it comes to using it in a script.

This issue is building off of the issue from this post:
https://github.com/plamere/spotipy/issues/254#issue-296182129

Enviorment

  • OS: Windows 11 Home and Raspberry Pi OS Lite
  • Python version 3.9.10
  • Spotipyversion: 2.19.0
  • IDE: Sipder, Jupyter Notebook, VS Code, Command Prompt

Screenshots

Loads in on Windows Terminal (command prompt)
2

Doesn't work on all other IDEs
3

4 1
Originally created by @gehuskic on GitHub (Jan 31, 2022). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/777 ### Bug Python is giving back errors that module spotipy does not exist. I tried installing the module multiple times with pip but nothing seems to make it work. `pip install spotipy` `pip3 install spotipy` I even tried playing around with the 'setup.py' file. batch: `python setup.py build` `python setup.py build_py` `python setup.py install` `python setup.py install_lib` For some reason on the command prompt I do not get any issues importing the module, only when it comes to using it in a script. This issue is building off of the issue from this post: https://github.com/plamere/spotipy/issues/254#issue-296182129 ### Enviorment - OS: Windows 11 Home and Raspberry Pi OS Lite - Python version 3.9.10 - Spotipyversion: 2.19.0 - IDE: Sipder, Jupyter Notebook, VS Code, Command Prompt ### Screenshots **Loads in on Windows Terminal (command prompt)** <img width="564" alt="2" src="https://user-images.githubusercontent.com/64159618/151815070-c08adc38-c1b6-46a6-b96e-69f281d0f9b1.png"> **Doesn't work on all other IDEs** <img width="564" alt="3" src="https://user-images.githubusercontent.com/64159618/151815205-40420292-fb63-4ccd-a273-7586d63dfd00.png"> <img width="564" alt="4" src="https://user-images.githubusercontent.com/64159618/151815224-4ac7ccde-cc42-49fd-80d5-1136144cd58b.png"> <img width="564" alt="1" src="https://user-images.githubusercontent.com/64159618/151815229-8db5c9c0-0948-47be-86c3-8d0da42e901e.png">
kerem 2026-02-27 23:22:50 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@gehuskic commented on GitHub (Jan 31, 2022):

And yes, it is installed when checked with pip freeze. I also reboot after each install to rule that out.

<!-- gh-comment-id:1025852673 --> @gehuskic commented on GitHub (Jan 31, 2022): And yes, it is installed when checked with `pip freeze`. I also reboot after each install to rule that out.
Author
Owner

@vavalomi commented on GitHub (Mar 7, 2022):

You seem to have multiple versions of python installed and your terminal defaults to one (where you have the module successfully installed) - look at the version: 3.9.10
To check where exactly the executable is located you can run
python -c "import os, sys; print(os.path.dirname(sys.executable))" in your Windows Terminal.

But your VSCode runs version 3.10 (from c:\users\genni\appdata...)

<!-- gh-comment-id:1061153032 --> @vavalomi commented on GitHub (Mar 7, 2022): You seem to have multiple versions of python installed and your terminal defaults to one (where you have the module successfully installed) - look at the version: 3.9.10 To check where exactly the executable is located you can run `python -c "import os, sys; print(os.path.dirname(sys.executable))"` in your Windows Terminal. But your VSCode runs version 3.10 (from c:\users\genni\appdata\...)
Author
Owner

@gehuskic commented on GitHub (Mar 8, 2022):

You seem to have multiple versions of python installed and your terminal defaults to one (where you have the module successfully installed) - look at the version: 3.9.10 To check where exactly the executable is located you can run python -c "import os, sys; print(os.path.dirname(sys.executable))" in your Windows Terminal.

But your VSCode runs version 3.10 (from c:\users\genni\appdata...)

Do you know know how I would change it back to 3.9.10 on VS code or spider?

<!-- gh-comment-id:1061343282 --> @gehuskic commented on GitHub (Mar 8, 2022): > You seem to have multiple versions of python installed and your terminal defaults to one (where you have the module successfully installed) - look at the version: 3.9.10 To check where exactly the executable is located you can run `python -c "import os, sys; print(os.path.dirname(sys.executable))"` in your Windows Terminal. > > But your VSCode runs version 3.10 (from c:\users\genni\appdata...) Do you know know how I would change it back to 3.9.10 on VS code or spider?
Author
Owner

@dieser-niko commented on GitHub (May 23, 2024):

Do you still need help here or can we close the issue?

<!-- gh-comment-id:2126299308 --> @dieser-niko commented on GitHub (May 23, 2024): Do you still need help here or can we close the issue?
Author
Owner

@dieser-niko commented on GitHub (Jun 11, 2024):

I'm going to close this issue as there's no activity. Also it seems to be somewhat outdated.

<!-- gh-comment-id:2160331826 --> @dieser-niko commented on GitHub (Jun 11, 2024): I'm going to close this issue as there's no activity. Also it seems to be somewhat outdated.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#475
No description provided.