Installed module but cant see it?

2040
6
Jump to solution
07-02-2019 06:56 PM
deleted-user-yC5VkbyXzrQR
Deactivated User

Hello, 

I'm a bit new to python libraries or modules. 

I want to use the pypiwin32 module in my python script. 

I typed cmd into cortana search and used the python cmd. I typed pip install pypiwin32. The screen shot below shows that it's already installed. 

Now when I try to import pypiwin32 in ArcPro, Juptyer, IDLE it says it doesn't exists. 

I did the same with xlsxwriter module and same results. What am I doing wrong here??  

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

GitHub - mhammond/pywin32: Python for Windows (pywin32) Extensions 

Tips on ActivePython, PyWin32 and virtualenv | ActiveState 

How about

import win32api
dir(win32api)
['AbortSystemShutdown', 'Apply', 'Beep', 'BeginUpdateResource', 'ChangeDisplaySettings',
'EnumResourceTypes', 'ExitWindows', .... snip ....

View solution in original post

6 Replies
DanPatterson_Retired
MVP Emeritus

you have permissions to install in the base environment? or did you also create a clone?

An  using

>>> conda list

…. snip ….

pywin32                   223              py36hfa6e2cd_1

pywin32's description Python extensions for Microsoft Windows Provides access to much of the Win32 API, the ability to create and use COM objects, and the Pythonwin environment.

And Mark Hammond is a maintainer.

pypiwin32 also has Mark Hammon as a maintainer, but there is no description

The difference between the two packages is listed here

Re: [python-win32] pywin32 und pypiwin32: what is the difference? « python-win32 « ActiveState List ... 

so I suspect the pywin32 that is distributed by esri is fine, since they don't use wheels for distribution but conda

0 Kudos
deleted-user-yC5VkbyXzrQR
Deactivated User

I had IT run python cmd as admin. I don't have admin rights to my computer. 

Also when i try to import pywin32 into my script it says that there's no module installed. 

When I do the conda list. It says pypiwin32 is there  ?  Idunno if that helps anything. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

don't use pip if a conda variant is available, which it is, so you, or your admin, needs to do a

conda install pywin32

0 Kudos
deleted-user-yC5VkbyXzrQR
Deactivated User

Dan, So i just did the conda install pywin32 and when I go to arcpro and try to import pywin32 it doesnt do anything. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

GitHub - mhammond/pywin32: Python for Windows (pywin32) Extensions 

Tips on ActivePython, PyWin32 and virtualenv | ActiveState 

How about

import win32api
dir(win32api)
['AbortSystemShutdown', 'Apply', 'Beep', 'BeginUpdateResource', 'ChangeDisplaySettings',
'EnumResourceTypes', 'ExitWindows', .... snip ....
deleted-user-yC5VkbyXzrQR
Deactivated User

NICE! I got it working thanks Dan! 

0 Kudos