Question

I've banged my head many hours trying to solve this, any help would be much appreciated.

I had Python 2.7.3 installed, and I never had any problems using pip. I installed Python 3.4 following the README with no errors, and now there are several packages that return errors when trying to install through pip3. For some packages it works fine though.

Here's the error I get when, for example, I try sudo pip3 install pysqlite http://pastebin.com/xTTK3zep and the log file: http://pastebin.com/23X8cmjU

Also happened when trying to install matplotlib, for example, with the same error:

Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pysqlite

If there's anything else I could provide to help answer the question, just let me know. Is this a bug, or am I doing something stupid? Thanks!

Was it helpful?

Solution

pip doesn't check that the package has been updated for your Python version. It seems that pysqlite hasn't - from the log file:

  File "/tmp/pip_build_root/pysqlite/setup.py", line 85

    print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."

                                                                       ^

SyntaxError: invalid syntax

This is a SyntaxError because print is a function in Python 3, not a statement. The only solution to this is to use a package that has been updated, or to update this one yourself. You might consider whether the builtin sqlite3 module meets your needs. As far as I can tell, it seems to be the same module; it is certainly, according to the docs, originally written by the same person.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top