msabramo / requests-unixsocket

Use requests to talk HTTP via a UNIX domain socket
Apache License 2.0
207 stars 29 forks source link

Cannot import #7

Closed nikolay closed 9 years ago

nikolay commented 9 years ago
# python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests_unixsocket
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/requests_unixsocket/__init__.py", line 4, in <module>
    from .adapters import UnixAdapter
  File "/usr/local/lib/python2.7/dist-packages/requests_unixsocket/adapters.py", line 5, in <module>
    from requests.packages.urllib3.connection import HTTPConnection
ImportError: No module named packages.urllib3.connection
# pip show urllib3

---
Name: urllib3
Version: 1.7.1
Location: /usr/lib/python2.7/dist-packages
Requires:
# pip show requests-unixsocket

---
Name: requests-unixsocket
Version: 0.1.2
Location: /usr/local/lib/python2.7/dist-packages
Requires: requests
phobologic commented 9 years ago

I ran into this as well nikolay - what version of 'requests' do you have installed? I had an older version, and it seems that version 2.5.1 (the latest) at least has the required packages in it (requests.packages)

msabramo commented 9 years ago

@nikolay: What version of requests did you have installed?

msabramo commented 9 years ago

@nikolay: Also, if you get a chance, can you please try the branch in https://github.com/msabramo/requests-unixsocket/pull/8 and see if that solves the problem?

msabramo commented 9 years ago

Closed by #8. Let me know if there are still problems.