Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23305

Pip install not working with visual studio code

$
0
0

I am attempting to install the "pygame" module. I can get it working and run the aliens example code in the terminal but not in my own python files.

I am using visual studio code. I have installed pygame through the command "pip install pygame" in the terminal. I am capable of running the aliens example code, but when I try to import pygame into a new python code file I get the following error:

No module named 'pygame'

import pygame is the only line of text in the new python file. Have looked up tutorials and one person found and issue with multiple installs of python (one from Microsoft store and one installed normally), tried uninstalling the Microsoft version but this did not solve the issue. This could be something to do with my installation on visual studio code but I am not sure. Ive seen something about adding a scripts directory but I dont understand at this stage?


Viewing all articles
Browse latest Browse all 23305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>