ImportError: cannot import name 'PrintTable' in Python 3.5.1 by pyenv -


i installed pyenv manage different versions of python, , use pip install printtable download , install printtable.

but when import module in interactive shell, doesn't work , shows importerror.

$ pyenv versions   system   2.7.11 * 3.5.1 (set /users/apple/.pyenv/version) $ pip list   pip (8.0.0)   printtable (1.2)   setuptools (18.2) $ python   python 3.5.1 (default, jan 21 2016, 12:50:43)   [gcc 4.2.1 compatible apple llvm 7.0.0 (clang-700.0.72)] on darwin   type "help", "copyright", "credits" or "license" more information.   >>> import printtable   traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "/users/apple/.pyenv/versions/3.5.1/lib/python3.5/site-packages/printtable/__init__.py", line 1, in <module>   printtable import printtable   importerror: cannot import name 'printtable' 

how can manage modules in pyenv?

ps. i'm following book automate boring stuff step step. printtable part in end of chapter 6.

visit: https://automatetheboringstuff.com/chapter6/

i downloaded printtable with

pip3 install --download /tmp printtable 

and inspected contentents of printtable-1.2.tar.gz. in printtable/printtable.py there code like

def  printtable(self,line_num=0): ....     print self.strtable 

indicating package not python 3 compatible.

it may possible install module by

tar xfv printtable-1.2.tar.gz cd printtable-1.2/ 2to3-3.5 --write printtable/*.py tests/*.py python3.5 setup.py build python3.5 setup.py install 

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -