Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

How to deal with two Python installation?

$
0
0

Hi,

 

I'm trying to call a external Python script in a User Defined Transform with following code:

 

import imp

 

google_analytics = imp.load_source('google_analytics',

'/leroy/scripts/python/google_analytics/GoogleAnalytics.py')

 

google_analytics.main()

 

This code return error:

 

23932 3892311808 DQX-058306 15/09/2015 18:30:37 File

"/leroy/scripts/python/google_analytics/GoogleAnalytics.py", line 9, in

<module>

23932 3892311808 DQX-058306 15/09/2015 18:30:37 from

apiclient.discovery import build

23932 3892311808 DQX-058306 15/09/2015 18:30:37

ImportError: No module named apiclient.discovery.

 

Executing the script /leroy/scripts/python/google_analytics/GoogleAnalytics.py on Linux works fine.

 

I believe that is because DataServices has a Python installation and we have another Python in Linux.

 

How to deal with packages dependencies that are installed only at Linux's Python?


Thank you!


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>