user7393973
user7393973

Reputation: 2440

How to install pywin32 without admin rights?

I want to use the library win32com on Python version 3.7.4 but I don't have administrator rights (only user admin rights I believe).

I also have the version 2.7.15 installed (which I can't uninstall) from when I did had admin rights and tried Python for my first time. That is the version that shows when I run the command python --version on the cmd console, so if I try to run the command python -m pip install pywin32 it does install but on that version and throws a warning that it will be deprecated January 1st, 2020.

So I'm trying to do it manually by following these instructions. I downloaded pywin32-225-cp37-cp37m-win32.whl (8.4 MB), unzipped to a folder and now I'm not sure what to do.

The Python folder is at:

%UserProfile%\AppData\Local\Programs\Python\Python37-32

Upvotes: 1

Views: 2111

Answers (1)

CristiFati
CristiFati

Reputation: 41147

Install the package in the user directory, by passing --user:

"${FULL_PATH_TO_YOUR_PYTHON37_EXECUTABLE}" -m pip install --user pywin32

where ${FULL_PATH_TO_YOUR_PYTHON37_EXECUTABLE} is just a placeholder (in your case it seems to be C:\Users\MyUserName\AppData\Local\Programs\Python\Python37-32\python.exe).

More details on [PyPA.PIP]: pip install (pip install -h).

Note: This is a duplicate of [SO]: How to install a package for specific version on python on windows 10? (@CristiFati's answer), but since that question has neither an accepted nor an upvoted answer, I can't mark this one as such.

Upvotes: 1

Related Questions