Forum Discussion
baxatob
Community Hero
Please show, where and how do you import the library.
Alexmak85
8 years agoOccasional Contributor
x64 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
- Alexmak858 years agoOccasional 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
- Alexmak858 years agoOccasional ContributorPlease, suggest: if i have test complete x86 (inside Python is also x86) , but win7 x64 Should i install full Python x86? What place is better to install: usual (c:) or to testcomplet/ext/bin/python?
- Alexmak858 years agoOccasional ContributorWhat i found about win32 api for Python. It turned out that win32com.client couldn't be imported more than once within the same process. Sorry, this is a limitation of the PyGILState API used by pywin32; pywin32 will never be able to play with the multiple interpreter API, nor work correctly with multiple interpreter initializations and cleanups. But such problem occurs with another libraries. For example, with lxml. Second import cause Test Complete crash :)
Related Content
- 9 years ago
Recent Discussions
- 7 hours ago