0

I am trying to install win32com.client. I do not have admin privileges as it is a work PC. I am using Anaconda 2021 so my version does not have it preinstalled. When I do install Python packages I just download the file and drop them in the following path:

anaconda3/Lib/Site-packages/...

For some reason I can't seem to do it with this.

Sunderam Dubey
  • 2,294
  • 9
  • 12
  • 22
Nicodeno S
  • 33
  • 5

1 Answers1

0

I was running into this problem. My solution is to reinstall Anaconda and when selecting installation type, select "Just Me" so that the installation is in your user directory where you have full access rights.

Perhaps this is not the most pleasant solution, as it requires reconfiguring your Anaconda setup, but it solves the problem.

Thornily
  • 386
  • 1
  • 9
  • I believe it is just me but I just can't use 'Anaconda Prompt' or 'Command prompt' to install any packages. Work has put in all sorts of proxies. I can't install or update any software. I can edit files in the Anaconda directory though. If there is any other work around. – Nicodeno S May 26 '22 at 18:41
  • I could try and ask the IT technicians but it could take a really long time. – Nicodeno S May 26 '22 at 18:43
  • 1
    @NicodenoS can you use the proxy? `pip install --proxy ` – Chrispresso May 26 '22 at 18:44
  • 1
    @Chrispresso or wouldn't just `pip install --user ` work? – Thornily May 26 '22 at 18:44
  • @Thornily if they're behind a proxy they probably can't contact the package manager. Or they could download the specific wheel [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32). Then just run the setup. – Chrispresso May 26 '22 at 18:49
  • Ah, makes more sense. – Thornily May 26 '22 at 18:51
  • It bypassed the proxies. So cool. I typed pip install --user pypiwin32 and it read 'Requirement already satisfied'. Maybe I should uninstall it and then reinstall it as I was dragging and dropping folders in the 'site-packages' folder. I'm not sure if that corrupted some files. I'll keep you updated. Nice. I never knew about this syntax. – Nicodeno S May 26 '22 at 18:54
  • I typed 'pip uninstall --user pypiwin32' and it read '(base) C:\>conda install --user pypiwin32 usage: conda-script.py [-h] [-V] command ... conda-script.py: error: unrecognized arguments: --user'. Just a note, I'm entering this in 'Anaconda Prompt'. – Nicodeno S May 26 '22 at 18:58
  • 1
    @NicodenoS There is no direct equivalent to --user in conda, read this and figure out a solution that works for you. https://stackoverflow.com/questions/51005148/conda-equivalent-of-pip-install-user – Thornily May 26 '22 at 19:00
  • Everyone. I realised the reason my code wasn't working was because I had written 'import win32.com'. I put a dot. I was treating it like a URL!. Either way you've taught me how to install packages in future. I really need to proof read my code carefully. Kudos for that and kudos for helping. – Nicodeno S May 26 '22 at 19:40