Forum Discussion

Smasi7's avatar
Smasi7
New Contributor
9 years ago

How can I import external python packages like "numpy" etc. in Testcomplete?

Hi,

 

is there a way of making the python34 installation, which comes with Testcomplete, find e.g the "site-packages" of my system's python34 installation?

 

 

2 Replies

    • Smasi7's avatar
      Smasi7
      New Contributor

      Hi Tanya,

       

      thanks for the reply. I had done this already before, but it seems that I was just not patient enough. Successful execution of the example code below took 90 seconds. Running it a seconds time did not give me output to the logs at all although a successful exit was indicated: it seems that the module is not properly unloaded with the prior test exit. Is there anything I have missed to consider for speeding up things or for a successful exit?

       

      from os import sys
      sys.path.append("C:\Python34\Lib\site-packages")
      from numpy import mean

      def test():
        b = mean([3,1,17])
        Log.Message(str(b))