Here is my error:
Traceback (most recent call last):
File "./convert.py", line 6, in <module>
import openpyxl # from https://pythonhosted.org/openpyxl/ or PyPI (e.g. via pip)
ImportError: No module named openpyxl
i have installed the python package openpyxl but this error still appear
Im using linux python version 2.6.6
any help please
i got this new error when i ran the python2.7 script.py:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip import main
File "/usr/local/lib/python2.7/site-packages/pip/__init__.py", line 13, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 15, in <module>
import zipfile
File "/usr/local/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/usr/local/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: /usr/local/lib/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException
openpyxl module has 2 dependent modules : 1. jdcal 2. et_xmlfile
I was able to install openpyxl module and this is what I did :
1.Downloaded the openpyxl,jdcal and et_xmlfile from https://pypi.python.org/pypi and saved jdcal-1.0.tar.gz, et_xmlfile-1.0.0.tar.gz,openpyxl-2.3.0-b2.tar.gz in a local folder in my system.
2.Then I ran the commands in the following order :
pip install jdcal-1.0.tar.gz
pip install et_xmlfile-1.0.0.tar.gz
pip install openpyxl-2.3.0-b2.tar.gz
openpyxl got successfully after this. Please check whether this helps.
Related
My issue
i have downloaded chardet, requests, typing, binary io, and django modules in an effort to fix whatever issue i am having while importing python module requests.
I also reainstalled python with the standard group of python modules option. I dont know what the issue is please help. Thank you.
Further information
Python 3.9
Installed using pip
The code:
import requests
Below is the error log:
Traceback (most recent call last):
File "C:\PROGRA~1\IBM\SPSS\STATIS~1\26\Python3\Lib\site-packages\requests\compat.py", line 12, in <module>
import chardet
ImportError: No module named 'chardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import requests
File "C:\PROGRA~1\IBM\SPSS\STATIS~1\26\Python3\Lib\site-packages\requests\__init__.py", line 45, in <module>
from .exceptions import RequestsDependencyWarning
File "C:\PROGRA~1\IBM\SPSS\STATIS~1\26\Python3\Lib\site-packages\requests\exceptions.py", line 11, in <module>
from .compat import JSONDecodeError as CompatJSONDecodeError
File "C:\PROGRA~1\IBM\SPSS\STATIS~1\26\Python3\Lib\site-packages\requests\compat.py", line 14, in <module>
import charset_normalizer as chardet
File "C:\PROGRA~1\IBM\SPSS\STATIS~1\26\Python3\Lib\site-packages\charset_normalizer\__init__.py", line 24, in <module>
from .api import from_bytes, from_fp, from_path, normalize
File "C:\PROGRA~1\IBM\SPSS\STATIS~1\26\Python3\Lib\site-packages\charset_normalizer\api.py", line 3, in <module>
from typing import BinaryIO, List, Optional, Set
ImportError: No module named 'typing'
I have found the issue after checking everything using pip. All modules up to date python up to date pip up to date. However despite completely uninstalling and reinstalling setuptools was out of date. so i updated setuptools with pip.
to find out whats out of date with pip:
pip list --outdated
when running "src/bitmessagemain.py" in the terminal it shows
Traceback (most recent call last):
File "src/bitmessagemain.py", line 33, in <module>
import shared
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/shared.py", line 19, in <module>
import highlevelcrypto
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/highlevelcrypto.py", line 16, in <module>
from bmconfigparser import BMConfigParser
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/bmconfigparser.py", line 10, in <module>
from six import string_types
ImportError: No module named six
I am guessing it has to do something with the virtualenv due to bitmessage still running on python 2.7 but I cant figure it out. I've made the environment for bitmessage to run in and I keep getting the error.
You probably don't have the six Python module installed,
try this:
pip install six
I am trying to run a program (obviously written in python) and it requires some python modules. One of the missed modules is aiomultiprocess. I tried installing it with pip install aiomultiprocess pip3 install aiomultiprocess python3.7 -m pip install aiomultiprocess but they all come back with the same error message:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 19, in <module>
from setuptools.dist import Distribution
File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 34, in <module>
from setuptools import windows_support
File "/usr/local/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/usr/local/lib/python3.7/ctypes/__init__.py", line 10, in <module>
from _ctypes import Union, Structure, Array
File "/usr/local/lib/python3.7/_ctypes.py", line 5, in <module>
import ffi
ModuleNotFoundError: No module named 'ffi'
No ffi module?! Let's get it!
I looked it up and figured it's a foreign library that come, in the case of python, as 2 forms: CFFI & LibFFI, but "ffi" doesn't exist for python. I installed cffi libffi and added them to this path /usr/local/lib/python3.7/site-packages/, but it changed nothing.
So my question is there another way to install python modules without the need of pip??!
I seem to have messed up my python install. I can't install new python packages:
$ pip install arq
Traceback (most recent call last):
File "/usr/local/bin/pip", line 6, in <module>
from pkg_resources import load_entry_point
File "/Users/me/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 48, in <module>
import six
ImportError: No module named six
And trying to address this error directly gives the same error:
$ pip install six
Traceback (most recent call last):
File "/usr/local/bin/pip", line 6, in <module>
from pkg_resources import load_entry_point
File "/Users/me/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 48, in <module>
import six
ImportError: No module named six
I'm not really sure what to do. All pip operations seem to fail for the same reason. pip freeze and just pip give the same result.
I'm on osx.
This is inspired by #Christian Dean's comment. But I am on OSX so what I did was to just reinstall pip from here:
http://pip.readthedocs.io/en/stable/installing/
I have the Anaconda distribution of Python 2.7 and I needed to install the Jupyter notebook package. During the installation process my computer turned off and after that I couldn't continue with the process. I tried to uninstall Jupyter and try installing it again, but I keep getting the same error:
Traceback (most recent call last):
File "C:\Users\Acer\Anaconda\Scripts\ipython-script.py", line 3, in <module>
from IPython import start_ipython
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\__init__.py", line 49, in <module>
from .terminal.embed import embed
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\terminal\embed.py", line 19, in <module>
from IPython.terminal.ipapp import load_default_config
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 22, in <module>
from IPython.core.completer import IPCompleter
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\core\completer.py", line 71, in <module>
from IPython.utils import generics
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\utils\generics.py", line 8, in <module>
from simplegeneric import generic
ImportError: No module named simplegeneric
What should I remove/add in order to make it work?
You need to install the python package simplegeneric. After you install it, you need to install the next package that you fail to import. Continue this process until you dont get any import errors.