Reputation: 339
I have tried using pip -m install win32api
, but I still get the error "can't open file 'pip': [Errno 2] No such file or directory"
Can anyone help me on this?
Note: I have renamed the python.exe file as python2 and python3, since I have both versions installed on my pc.
Upvotes: 29
Views: 129063
Reputation: 11
In my case the problem was that i had not installed pip3 so there was no directory for it so i fixed it with installing pip3
sudo apt install python3-pip
and then checked the version of pip `
pip3 --version
and installed every package with
pip3 install Django=4.2.2
you can install any component this is just for example.
Upvotes: 1
Reputation: 1
In my case I fix path problem.
C:\Users\Chhaya\AppData\Local\Programs\Python\Python36\Lib\site-packages
I put above path in path variable,
step1: right click on this PC, click on properties
step2:click on Advance system setting, new window will pop up
step3:click on Environment varible, you will see PATH ,edit path & put above path which in my case,
if you install in other drive find out path like Python36\Lib\site-packages
Upvotes: -2
Reputation: 139
Depending on your python interpreter environment variable path, you need to either py -m pip install win32api
or
Use python -m pip install win32api
In my case, py -m pip install win32api
worked but python -m pip install win32api
didn't
Upvotes: 6
Reputation: 21
I had the same error message while trying to lunch the command "manage.py". I solved the problem by writing the command in python shell after entering the folder where the files django-admin.exe and django-admin.py are. Please see screen-shot attached.
Upvotes: 0
Reputation: 935
python -m pip install pypiwin32
This should solve the issue. Note that the package name you used is not the canonical name.
Upvotes: 45