Forum Discussion
- baxatobCommunity Hero
Please show, where and how do you import the library.
- Alexmak85Occasional Contributorx64 Win7 1)Install TC12.3 2) Install Python 3.6.x (x64) to folder where we have TC Python: C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36 to get it registered, to get pip and full Python I download and install Python (x64), but can see in cmd that i have x86 Python (!??!!?) So, i can install only x86 libs. 3) donwload x86 lib and install via pip: pywin32-221-cp36-cp36m-win32.whl Aftre this i use: import sys sys.path.insert(0, r'C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages') sys.path.insert(0, r'C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages\win32') sys.path.insert(0, r'C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages\win32\lib') import win32com.client
- Alexmak85Occasional Contributorx64 Win7 1)Install TC12.3 2) Install Python 3.6.x (x64) to folder where we have TC Python: C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36 to get it registered, to get pip and full Python I download and install Python (x64), but can see in cmd that i have x86 Python !? So, i can install only x86 libs. 3) donwload x86 lib and install via pip: pywin32-221-cp36-cp36m-win32.whl Aftre this i use: import sys sys.path.insert(0, r'C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages') sys.path.insert(0, r'C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages\win32') sys.path.insert(0, r'C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages\win32\lib') import win32com.client
- PythonAndTCOccasional Contributor
TestComplete cannot work correctly with the win32com Python library because this library cannot work after the reinitialization of the Python interpreter. You can find the same information on the official SourceForge page (https://sourceforge.net/p/pywin32/bugs/445/): "pywin32 will never be able to play with the multiple interpreter API, nor work correctly with multiple interpreter initializations and cleanups". And, that's why, it could work successfully only one time, and, after this, you needed to relaunch the tool.
Related Content
- 9 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago