0

I'm trying to install one well-known framework and I cannot find any info regarding Python version used. The framework is mostly on cpp with some python wrapping. I've check the website, github and readme. How can I know this?

I've originally installed everything for python 3, because I see print() with parenthesis. But when I try to import it I get error

ImportError: dynamic module does not define init function

(which seems to arise from cpp module) which is described as version mismatch error in other SO answer. Now I have to reinstall all prerequisites to python 2, but I'm still not sure which version should I use actually.

noname7619
  • 3,370
  • 3
  • 21
  • 26
  • Why don't you tell us what is this mysterious "well-known framework". I think it would make things easier... – K. Kirsz Jul 03 '17 at 08:29
  • Because I want a general way of knowing which version is used rather than a single-use answer. It now works with 2, but I'm still confused how come it be 2 with print() and how can I know it in advance. The library is Caffe. – noname7619 Jul 03 '17 at 08:44
  • Well python 2 works with print(), because it can interpret the "()" part as an inline tuple definition and it just prints that. It still isn't a function call as in python 3. You can see the differenc if you run something like `print(2,3)`vs. `print 2,3`. Still, i have no good advice when it comes to the original question... :( – K. Kirsz Jul 03 '17 at 08:52
  • There is a simmilar question here: https://stackoverflow.com/questions/32957645/is-it-possible-to-check-if-python-sourcecode-was-written-only-for-one-version-p – K. Kirsz Jul 03 '17 at 09:01
  • You can have both python 2.7 and python 3 side by side. Install the package in question in verbose mode and see where the files get copied etc. to get a clue. – Ashish Vyas Jul 03 '17 at 09:13
  • c0dec0de I usually create virtualenv with one python version. Do you mean installing to the system environment? This ruins the idea of vrtualenv. – noname7619 Jul 03 '17 at 09:21

0 Answers0