Python not able to find package but it is installed

Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de
Tue May 30 05:34:59 EDT 2017


On 05/30/2017 10:18 AM, Mahmood Naderan via Python-list wrote:
> Hello,
> Although I have installed a package via pip on a centos-6.6, python interpreter still says there is no such package!
> 
> Please see the output below
> 
> $ python exread2.py input.xlsx tmp/output
> Traceback (most recent call last):
> File "/home/mahmood/excetest/exread2.py", line 1, in <module>
> from openpyxl import load_workbook
> ImportError: No module named openpyxl
> 
> 
> $ pip install openpyxl
> DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
> Requirement already satisfied: openpyxl in /opt/rocks/lib/python2.6/site-packages
> 
> ...
> 

In addition to checking sys.path as suggested, also try running

python -V

to check if it's Python2.6 as reported by pip or if you have two 
different versions of Python installed.




More information about the Python-list mailing list