integrating WHL Python packages
Hi,
as far as i can understand from the documentation and examples here in the community - TC supports integrating external Python libraries using EGG files, which is a very old (since 2004) format.
Since 2012, the format in use is mostly WHL, and many libraries does not offer you the egg files anymore..
I know that there are converting tools, like HUMPTY but they are on a "it worked for me" bases, since no one can guarantee or promises that nothing won't get mixed up from that convert..
Is there a way to use WHL files too?
I've tried it with numpy WHL file and it did not work. (can't attach it here for some reason. you can download here: https://pypi.org/project/numpy/#files)
I'm not sure if it didn't work because the WHL is not supported or because of some other stuff (maybe not all external libs can be integrated? see the message from baxatob, 06-21-2017 11:45 AM, in this link(,): https://community.smartbear.com/t5/TestComplete-Mobile-Application/How-do-i-add-Python-Libraries-and-extend-the-Pyton-support-on/m-p/118787#M973)
thanks,
Nadav.
Just to close the loop and save time for future users with the same problem, the solution is as followed:
1. open the WHL file with 7-zip
2. extract the folders in it to "C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages" folder.
3. add these lines to the start of your code:
import sys
sys.path.insert(0, 'C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\Extensions\Python\Python36\Lib\site-packages'
import <your lib name (in my case: numpy)>
that worked like a charm.
*** credit to Yuriy from SmartBear Customer Care for the solution ***