0

I have Python 2.7.6 installed in my system. I was trying to install PyML but I got this error message ValueError: [u' path'] then I found a solution here, Errors while building/installing C module for Python 2.7 which tells me that it is because I have 64 bit version of Python and I need vcvarsamd64.bat.

It advices to install VS 2008 and .NET 3.5 SDK first, since Python 2.7 version is compatible with VS 2008 compiler. I have already had VS 2010 and .NET 4 SDK in my system which I do not want to uninstall, so I uninstall Python 2.7 and install Python 3.3, and added its path to System Variables.

Now I have been trying to build the package again, setup.py build but this time, I have this error message saying python 2.5 or later is required although I actually have python 3.3!

Thanks in advance.

Community
  • 1
  • 1
patti_jane
  • 3,293
  • 5
  • 21
  • 26
  • I don't know about your particular packages, but in general python 2 and python 3 have different pips, different site-package directories, etc. Your error indicates you need python 2.5+ **in the python 2 series**. If you are using Python 3, you probably need new versions of your libraries, too. – Two-Bit Alchemist Mar 11 '14 at 17:25
  • PyML also requires python 2.5 or higher version as it is indicated in their website, so I thought python 3 series are also applicable. But that sounds logical, thank you! This means I am back to rabbit hole. – patti_jane Mar 11 '14 at 17:32

1 Answers1

0

Python2.x and Python3.x are actually totally different. While it is possible to write code that runs on python2 and python3, most developers will either target python 2 or python 3 (but not both). See: https://wiki.python.org/moin/Python2orPython3 and http://python3porting.com/noconv.html

So if you were on python 2.x, I would advise that you stick to python 2.x (2.7 is the latest in the 2.x line). As for the problem with installing the pyML module, perhaps you could provide more detail to make it easier to understand the problem. What command use did you use to install PyML? Can you paste the output of that? Or if via a GUI, give us more details.

Edit

So if your problem is the same as that listed in the thread that you linked to, the problems is that you do not have a 64 bit compiler installed. See the answer on this thread: https://stackoverflow.com/a/4676840/880324 Of course if you're using VS 2010, You need to install the 64 bit component of the VS 2010 compiler. But first make sure that you are using a 64bit python. An easy way to do this is to run python from the command line and then execute the following code:

import sys
sys.maxsize > 2**32

If it prints True, you're on a 64bit python otherwise you're on 32bit python.

Community
  • 1
  • 1
Avatar33
  • 787
  • 5
  • 14
  • Thanks a lot! I have already seen that solution, but it did not work for me as well. And as far as I understand, python 2.7 is designed to work with VS 2008 compiler! Finally I gave up and installed the package on OSX which worked pretty well. – patti_jane Mar 13 '14 at 14:42