disqus / disqus-python

Disqus API bindings for Python
https://disqus.com/api/docs/
Apache License 2.0
165 stars 51 forks source link

cannot import disqusapi with python3 #34

Open carsonpun opened 7 years ago

carsonpun commented 7 years ago

After I started ipython3, and typed in the shell import disqusapi, it showed ImportError: No module named 'httplib'. Seems look like the disqusapi isn't supporting python3?

I'm using Python 3.5.2 :: Anaconda custom (x86_64)

Here's the error log:

In [1]: import disqusapi
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-1dede7c1a4ae> in <module>()
----> 1 import disqusapi

/Users/kspun/anaconda3/lib/python3.5/site-packages/disqusapi/__init__.py in <module>()
     13     __version__ = 'unknown'
     14 
---> 15 import httplib
     16 import os.path
     17 import simplejson

ImportError: No module named 'httplib'
carsonpun commented 7 years ago

Just tried something more to make it work:

I was using pip3 install disqus-python3, which gave the above error.

If I use

pip3 install --upgrade https://github.com/disqus/disqus-python/archive/master.zip

I can do import disqusapi without issues.

macabeus commented 7 years ago

I have the same issue and fix with same way. Maybe anybody forgot update the package in Pip =P