Cannot install py2neo: cannot import name SSLContext

598 views
Skip to first unread message

Alan Robertson

unread,
Mar 31, 2016, 6:20:12 PM3/31/16
to Neo4J, Nigel Small
Hi,

When I try and do a pip install "py2neo>2.0.7", I get the same error on exactly two versions of Linux:
Ubuntu precise and Debian wheezy. The errors are reproducible. Re-creating a clean build environment from scratch doesn't help. The builds are exactly the same ones that I used to put out the 1.0.3 version at the end of February - and it all worked then. See https://github.com/nigelsmall/py2neo/issues/487 for the GitHub issue.

These versions all work:
CentOS centos7
CentOS6
openSUSE 13.2
openSUSE 42.1
Ubuntu trusty
Ubuntu vivid
Ubuntu wily
Debian jessie
Fedora 21
Fedora 22


Here's the error from Ubuntu precise:

Step 14 : RUN pip install ctypesgen 'py2neo>2.0.7' getent
---> Running in 6a80194d49c4
Downloading/unpacking ctypesgen
 Running setup.py egg_info for package ctypesgen
    
Downloading/unpacking py2neo>2.0.7
 Running setup.py egg_info for package py2neo
   Traceback (most recent call last):
     File "<string>", line 14, in <module>
     File "/build/py2neo/setup.py", line 26, in <module>
       from py2neo import __author__, __email__, __license__, __package__, __version__
     File "py2neo/__init__.py", line 28, in <module>
       from py2neo.database import *
     File "py2neo/database/__init__.py", line 26, in <module>
       from py2neo.database.cypher import cypher_escape, cypher_repr
     File "py2neo/database/cypher.py", line 24, in <module>
       from py2neo.types import Node, Relationship, Path
     File "py2neo/types.py", line 23, in <module>
       from py2neo.database.http import Resource
     File "py2neo/database/http.py", line 20, in <module>
       from py2neo.database.auth import ServerAddress, keyring
     File "py2neo/database/auth.py", line 22, in <module>
       from py2neo.packages.neo4j.v1 import basic_auth
     File "py2neo/packages/neo4j/v1/__init__.py", line 22, in <module>
       from .session import *
     File "py2neo/packages/neo4j/v1/session.py", line 32, in <module>
       from ssl import SSLContext, PROTOCOL_SSLv23, OP_NO_SSLv2, CERT_REQUIRED
   ImportError: cannot import name SSLContext


--

Alan Robertson / CTO
Al...@AssimilationSystems.com / +1 303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter Linkedin skype

Christoph Pingel

unread,
Apr 7, 2016, 3:56:46 AM4/7/16
to ne...@googlegroups.com
Which version of pip/Python are you using?
ssl.SSLContext is only available in Python 2.7.9 or later: https://docs.python.org/2/library/ssl.html#ssl.SSLContext

Hope this helps,
best regards,
Christoph

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christoph Pingel

unread,
Apr 7, 2016, 3:56:49 AM4/7/16
to ne...@googlegroups.com
BTW, I could reproduce this error on my Ubuntu 12.04 Server with Python 2.7.3, but I didn't have to install py2neo there (yet).

best,
Christoph

Nigel Small

unread,
Apr 7, 2016, 6:52:20 AM4/7/16
to Neo4j
This will downgrade gracefully in the next beta release. For versions of 2.7 earlier than 2.7.9, SSL will be unavailable but the library should load correctly.
Reply all
Reply to author
Forward
0 new messages