I imported pygame through terminal, but the python shell says that it doesn't know a module named pygame. I...











up vote
1
down vote

favorite












I want to use pygames mouse functions, but i cant get it to work. In terminal, i used pip install pygame. It said that the module was already installed. I decided to import pygame in the shell to test it. but it returned



Traceback (most recent call last):
File "/Users/GAMEKNIGHT7/Desktop/genius
hour/chineseCheckersAI.py", line 13, in <module>
import pygame
ModuleNotFoundError: No module named 'pygame'


What happened??










share|improve this question






















  • Do you have 2 versions of Python?
    – Santosh Kumar
    Nov 11 at 3:20










  • No, i started coding when python 3.5 came out.
    – F. Zeng
    Nov 11 at 3:23










  • The terminal says:Requirement already satisfied: pygame in /Users/......./.local/lib/python3.7/site-packages (1.9.4)
    – F. Zeng
    Nov 11 at 3:24








  • 1




    Run python --version in the terminal, to see if your running 2 versions of python, python 3.7 and python ?.?
    – MilkyWay90
    Nov 11 at 4:15










  • What is the output of import sys; print(sys.path); in your python terminal and is the package installed to any directory listed in this output?
    – quant
    Nov 11 at 6:18















up vote
1
down vote

favorite












I want to use pygames mouse functions, but i cant get it to work. In terminal, i used pip install pygame. It said that the module was already installed. I decided to import pygame in the shell to test it. but it returned



Traceback (most recent call last):
File "/Users/GAMEKNIGHT7/Desktop/genius
hour/chineseCheckersAI.py", line 13, in <module>
import pygame
ModuleNotFoundError: No module named 'pygame'


What happened??










share|improve this question






















  • Do you have 2 versions of Python?
    – Santosh Kumar
    Nov 11 at 3:20










  • No, i started coding when python 3.5 came out.
    – F. Zeng
    Nov 11 at 3:23










  • The terminal says:Requirement already satisfied: pygame in /Users/......./.local/lib/python3.7/site-packages (1.9.4)
    – F. Zeng
    Nov 11 at 3:24








  • 1




    Run python --version in the terminal, to see if your running 2 versions of python, python 3.7 and python ?.?
    – MilkyWay90
    Nov 11 at 4:15










  • What is the output of import sys; print(sys.path); in your python terminal and is the package installed to any directory listed in this output?
    – quant
    Nov 11 at 6:18













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I want to use pygames mouse functions, but i cant get it to work. In terminal, i used pip install pygame. It said that the module was already installed. I decided to import pygame in the shell to test it. but it returned



Traceback (most recent call last):
File "/Users/GAMEKNIGHT7/Desktop/genius
hour/chineseCheckersAI.py", line 13, in <module>
import pygame
ModuleNotFoundError: No module named 'pygame'


What happened??










share|improve this question













I want to use pygames mouse functions, but i cant get it to work. In terminal, i used pip install pygame. It said that the module was already installed. I decided to import pygame in the shell to test it. but it returned



Traceback (most recent call last):
File "/Users/GAMEKNIGHT7/Desktop/genius
hour/chineseCheckersAI.py", line 13, in <module>
import pygame
ModuleNotFoundError: No module named 'pygame'


What happened??







python pygame






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 at 3:08









F. Zeng

209




209












  • Do you have 2 versions of Python?
    – Santosh Kumar
    Nov 11 at 3:20










  • No, i started coding when python 3.5 came out.
    – F. Zeng
    Nov 11 at 3:23










  • The terminal says:Requirement already satisfied: pygame in /Users/......./.local/lib/python3.7/site-packages (1.9.4)
    – F. Zeng
    Nov 11 at 3:24








  • 1




    Run python --version in the terminal, to see if your running 2 versions of python, python 3.7 and python ?.?
    – MilkyWay90
    Nov 11 at 4:15










  • What is the output of import sys; print(sys.path); in your python terminal and is the package installed to any directory listed in this output?
    – quant
    Nov 11 at 6:18


















  • Do you have 2 versions of Python?
    – Santosh Kumar
    Nov 11 at 3:20










  • No, i started coding when python 3.5 came out.
    – F. Zeng
    Nov 11 at 3:23










  • The terminal says:Requirement already satisfied: pygame in /Users/......./.local/lib/python3.7/site-packages (1.9.4)
    – F. Zeng
    Nov 11 at 3:24








  • 1




    Run python --version in the terminal, to see if your running 2 versions of python, python 3.7 and python ?.?
    – MilkyWay90
    Nov 11 at 4:15










  • What is the output of import sys; print(sys.path); in your python terminal and is the package installed to any directory listed in this output?
    – quant
    Nov 11 at 6:18
















Do you have 2 versions of Python?
– Santosh Kumar
Nov 11 at 3:20




Do you have 2 versions of Python?
– Santosh Kumar
Nov 11 at 3:20












No, i started coding when python 3.5 came out.
– F. Zeng
Nov 11 at 3:23




No, i started coding when python 3.5 came out.
– F. Zeng
Nov 11 at 3:23












The terminal says:Requirement already satisfied: pygame in /Users/......./.local/lib/python3.7/site-packages (1.9.4)
– F. Zeng
Nov 11 at 3:24






The terminal says:Requirement already satisfied: pygame in /Users/......./.local/lib/python3.7/site-packages (1.9.4)
– F. Zeng
Nov 11 at 3:24






1




1




Run python --version in the terminal, to see if your running 2 versions of python, python 3.7 and python ?.?
– MilkyWay90
Nov 11 at 4:15




Run python --version in the terminal, to see if your running 2 versions of python, python 3.7 and python ?.?
– MilkyWay90
Nov 11 at 4:15












What is the output of import sys; print(sys.path); in your python terminal and is the package installed to any directory listed in this output?
– quant
Nov 11 at 6:18




What is the output of import sys; print(sys.path); in your python terminal and is the package installed to any directory listed in this output?
– quant
Nov 11 at 6:18

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245517%2fi-imported-pygame-through-terminal-but-the-python-shell-says-that-it-doesnt-kn%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245517%2fi-imported-pygame-through-terminal-but-the-python-shell-says-that-it-doesnt-kn%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Coverage of Google Street View

Full-time equivalent

Surfing