I need to use module pyexcel. So I download it with pip install --index-url=https://pypi.python.org/simple/ pyexcel
I added import pyexcel to my code and try to run it, but I get this message:
/home/pem# python2 ./test1.py
Traceback (most recent call last):
File "./test1.py", line 3, in <module>
import pyexcel
File "/usr/local/lib/python2.7/dist-packages/pyexcel-0.6.6-py2.7.egg/pyexcel/__init__.py", line 12, in <module>
from .book import Book
File "/usr/local/lib/python2.7/dist-packages/pyexcel-0.6.6-py2.7.egg/pyexcel/book.py", line 10, in <module>
from pyexcel import _compact as compact
File "/usr/local/lib/python2.7/dist-packages/pyexcel-0.6.6-py2.7.egg/pyexcel/_compact.py", line 21, in <module>
from urllib import request as request
ImportError: cannot import name request
test1.py looks like:
#!/usr/bin/python2
import pyexcel
What is the problem?
You have a
python2environment but are trying to usepyexcelwhich requires Python >=3.6. Create apython3.6or greater environment and it will work fine.