McHenry McHenry - 4 months ago 9x
Python Question

Multiple Python Interpreters used in the same project?

I am using pycharm and it only lets you use one interpreter for example Python 2.7.5 or Python 3.5.1.

The problem is I have certain modules one from google to access analytics data and one called docxfactory that I want to use together.

I can only get docxfactory to work on Python 3.5.1 and I can only get analytics to work on 2.7.5...

How can I get it so I can use these two modules together? I read an answer on here that said to have them in two different projects and unless I did that wrong I tried that with no success... any ideas?


One idea is to write two seperate scripts; one for analytics and one for docxfactory. Decide which of these is the driver, and have that driver shell the other -- being sure to invoke the appropriate version of python.


#/usr/bin/env python2.7
import subprocess
# Do something with analytics
# ...
# Now call docxfactory script['python3', ''])