Problem:
Users may encounter a "ModuleNotFoundError: No module named 'pywintypes'" when using certain Python packages, particularly requests-negotiate-sspi, in Spotfire 14 Python environment. This issue is related to the pywin32 package, which requires a special post-installation step.
Solution:
- Identify the affected packages:
Typically, this issue affects packages that depend on pywin32, such as requests-negotiate-sspi.
Manual installation of pywin32:
a. Download the appropriate pywin32 wheel file for Python 3.11 from a trusted source.
b. Install the wheel file manually in the Spotfire Python environment:
For Analyst: [Spotfire installation path]\Python Packages Windows_[version]\site-packages
For Python Service: [Python Service installation path]\python\Lib\site-packages
- Run the post-installation script:
Locate the pywin32_postinstall.py script in the installed pywin32 package.
Run the script with administrator privileges using the Spotfire Python interpreter.
- Verify installation:
Open the Spotfire Python interpreter and attempt to import pywintypes.
If successful, retry the original package import (e.g., requests-negotiate-sspi).
- Update custom SPK files:
If using custom SPK files, ensure they do not include pywin32.
Document the manual installation step for pywin32 in your deployment process.
- Consider alternatives:
If possible, explore alternative packages that do not rely on pywin32 for your specific use case.
Note: This manual installation process is required because the Spotfire Package Manager (SPK) system cannot perform the necessary post-installation steps for pywin32. Always ensure that manually installed packages are compatible with your Spotfire version and Python environment.
This box will be hidden from the public.
Source Case 301499
Comments
0 comments
Article is closed for comments.