Muhamed Huseinbašić
Muhamed Huseinbašić

Reputation: 580

Error importing modules in Python

I've just installed Python 2.7.8 (as default version) following these steps. I was using Python 2.7.6 before this. I have been importing modules such as pyglet, gasp and pygame normally. Now, I can't import any of these (whenever I try, I get

No module named (some module)

error). I haven't changed anything. Each of these are properly installed. I even removed (with all dependencies) and installed pyglet again, but problem remained. Please help.

Upvotes: 0

Views: 145

Answers (1)

sk11
sk11

Reputation: 1824

Are you sure you are installing the modules under new Python installation directory?

You need to install all the modules for the new Python version.

  • Check under your Python2.7.8 installation directory <PYTHON2.7.8_INSTALL_DIR>\Lib\site-packages\ whether you have all the needed modules or not.
  • To install into the modules under the new Python, use the new easy_install.exe or pip.exe under <PYTHON2.7.8_INSTALL_DIR>\Scripts

Upvotes: 1

Related Questions