tumblr / pytumblr

A Python Tumblr API v2 Client
Apache License 2.0
723 stars 197 forks source link

python3: ImportError: No module named 'future' #98

Closed thraxil closed 7 years ago

thraxil commented 7 years ago

Can't import pytumblr on Python 3:

Python 3.5.2 (default, Aug 18 2017, 17:48:00) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytumblr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/anders/code/python/spokehub/ve/lib/python3.5/site-packages/pytumblr/__init__.py", line 5, in <module>
    from .request import TumblrRequest
  File "/home/anders/code/python/spokehub/ve/lib/python3.5/site-packages/pytumblr/request.py", line 1, in <module>
    from future import standard_library
ImportError: No module named 'future'
>>> 
jasonpenny commented 7 years ago

I can't reproduce this, do you have the complete steps that you followed?

Steps that worked for me

# create a virtualenv
python3.5 -m venv t

# activate the virtualenv
. t/bin/activate

# install pytumblr
cd pytumblr
python3.5 setup.py install
# output includes 'future'
    ...
    Searching for future
    Reading https://pypi.python.org/simple/future/
    Best match: future 0.16.0
    Downloading https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz#md5=3e8e88a2bda48d54b1da7634d04760d7
    Processing future-0.16.0.tar.gz
    ...

python3.5
    Python 3.5.2 (default, Sep 30 2017, 18:02:24)
    [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pytumblr
    >>>
jasonpenny commented 7 years ago

Python3 support has been pushed to pypi, so installing pytumblr using pip with python3 should work now. @thraxil try upgrading your pytumblr install and re-open this issue if it's still a problem