4

I am new to using python, and am wanting to be able to install packages for python using pip. I am having trouble running pip on my windows computer. When typing in "pip --version" into command prompt I get:

ModuleNotFoundError: No module named 'pip._internal'; 'pip' is not a package

I have added the scripts folder to the PATH environment variable as shown on the picture in this link Environment variables photo (Stack overflow does not allow embedded pictures if you are new)

This is the contents of my scripts directory where pip is present:

Directory of C:\Users\....\AppData\Local\Programs\Python\Python37-32\Scripts

[.]                    [..]                   easy_install-3.7.exe
easy_install.exe       pip-script.py          pip.exe
pip.exe.manifest       pip3                   pip3-script.py
pip3.7-script.py       pip3.7.exe             pip3.7.exe.manifest
pip3.exe               pip3.exe.manifest      wheel.exe

Any help on this would be appreciated

JoshDanga
  • 63
  • 1
  • 7

2 Answers2

4

Force a reinstall of pip:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --force-reinstall

For windows you may have to choco install curl or set PATH to where python3 is located

Jonathan
  • 6,741
  • 7
  • 52
  • 69
0

In cmd try using

py -3.6 -m pip install pygmae

replace 3.6 with your version of python and add -32 fot 32 bit version

py -3.6-32 pip install pygame

replace pygame with the module you want to install

this works for most people using python on windows also reboot your pc after adding system variable path

BigZee
  • 456
  • 5
  • 22
  • 1
    Thanks for your response. I tried this in cmd and still get: C:\WINDOWS\System32>py -3.7-32 -m pip install pygame Collecting install Could not find a version that satisfies the requirement install (from versions: ) No matching distribution found for install – JoshDanga Aug 14 '18 at 02:21
  • ok this means that your pip is working ok but I think pygame doesn't have a version for python 3.7 try using some other library that you know supports python 3.7 32 bit version such as numpy or cv2 let me know what happens cuz I have another way to install libraries using brute force on windows – BigZee Aug 16 '18 at 23:05
  • This is the result I currently get when entering C:\WINDOWS\System32>py -3.7-32 pip install numpy (null): can't open file 'pip': [Errno 2] No such file or directory – JoshDanga Aug 31 '18 at 06:09
  • try uninstalling python 3.7 and then reinstalling the latest version then try again. – BigZee Aug 31 '18 at 23:10