0

I'm trying to install py2neo on an offline machine. I can't use pip because I'm not connected to the internet. I'm trying to install py2neo-2.0.3 with python2.7.9 on redhat. When I run python setup.py install I get ImportError: cannot import name HTTPSConnection.

Traceback (most recent call last):
    File "setup.py", line 29, in <module>
     from py2neo import __author__, __email__, __license__, __package__, __version__
    File "usr/lib/py2neo-2.0.3/py2neo/__init__.py" line 27, in <module>
     from py2neo.core import * 
    File "usr/lib/py2neo-2.0.3/py2neo/core.py", line 28, in <module>
     from py2neo.env import NEO4J_AUTH_TOKEN, NEO4J_URI
    File "usr/lib/py2neo-2.0.3/py2neo/env.py", line 21, in <module>
     from py2neo.packages.httpstream.packages.urimagic import URI
    File "usr/lib/py2neo-2.0.3/py2neo/packages/httpstream/__init__.py", line 32, in <module>
     from .http import *
    File "usr/lib/py2neo-2.0.3/py2neo/packages/httpstream/http.py", line 31, in <module>
     from httplib import (BadStatusLine, CannotSendRequest,
ImportError: cannot import name HTTPSConnection

I've tried installing httpstream but that didn't fix the import error.

adam
  • 940
  • 5
  • 13
  • 30

1 Answers1

0

HTTPSConnection should come with the standard library and isn't part of py2neo itself:

https://docs.python.org/2/library/httplib.html#httplib.HTTPSConnection

I don't know specifically about how RedHat package Python but it's possible you need to install SSL support in addition to the main language. I believe this is a separate compilation option:

http://www.webtop.com.au/blog/compiling-python-with-ssl-support-fedora-10-2009020237

Nigel Small
  • 4,475
  • 1
  • 17
  • 15
  • I couldn't get it fixed, even with installing openssl, but I'm fairly certain this is an issue with my RedHat and not py2neo/python. After installing openssl I still have to chase down a bunch of other dependencie – adam Jan 15 '15 at 19:42