Hi I'm using ebooklib in python and I'm getting this error
ModuleNotFoundError: No module named 'ebooklib'
I have successfully installed this library and it appears in my pip3 packages list.
I'm importing this in my python file like this
import os
import logging
import sys
import json
import traceback
from ast import literal_eval
from htmlparse import MyHTMLParser
from ebooklib import epub
I don't know what's wrong.
I had the same issue & fixed it by adding:
> export PYTHONPATH="/usr/local/lib/python3.8/site-packages:$PYTHONPATH"
to my .bash_profile file.
To see where your ebooklib is installed to
print(ebooklib.__file__)
Related
I am converting a python file to .exe using pyinstaller v5.0.1, but I got this error when I run the exe file:
ModuleNotFoundError: No module named 'reportlab.graphics.barcode.code93'
Note that the python file is working perfectly and I'm not even using code93 in my code.
I have fixed this issue by adding an import for all this libs even if I don't use them:
from reportlab.graphics.barcode import code93
from reportlab.graphics.barcode import code39
from reportlab.graphics.barcode import usps
from reportlab.graphics.barcode import usps4s
from reportlab.graphics.barcode import ecc200datamatrix
I'm slowly despairing of Python import module
-Cloned binance_f from github and installed with setup.py.
-Modification in files don't show up --> I searched and found:
import importlib
importlib.reload(module)
Then I get an error message:
> importlib.reload(binance_f)
> NameError: name 'binance_f' is not defined
The problem might be the "from" statement:
from binance_f import RequestClient
from binance_f.model import *
from binance_f.constant.test import *
from binance_f.base.printobject import *
import importlib
importlib.reload(binance_f)
If I don't execute the setup.py I get the follwoing error:
> from binance_f import RequestClient
> ModuleNotFoundError: No module named 'binance_f'
How can that issue be resolved? Is there any way to "globally" reload other modules? I mean, what are you doing if you clone a github repository but can not change the files?
Best regards
I am trying to run a program. It said in it's readme to install requirements first, so I did and it installed pyforms and python_docx
But now when I execute command
python
and i get the error ModuleNotFoundError: No module named 'pyforms.gui'
How can that be fixed?
I tried manually installing pyforms-gui and got message that I already have this module installed.
# -*- coding: utf-8 -*-
import pyforms
from pyforms.controls import ControlButton
from pyforms.gui.controls.ControlEmptyWidget import ControlEmptyWidget #problematic line
from pyforms.gui.controls.ControlProgress import ControlProgress
from generation import Project
from widgets.stage_13 import Stage13Window
from widgets.stage_5 import Stage5Window
from .initial_data_editor import InitialDataEditor
Your import statement is incorrect. The correct imports are given here. Note that pyform.gui is now pyforms_gui.
from pyforms_gui.controls.control_emptywidget import ControlEmptyWidget
from pyforms_gui.controls.control_progress import ControlProgress
I have recently installed a library using this code:
pip install scikit-commpy
Moreover, I downloaded the tar.gz file from this site: https://pypi.org/project/scikit-commpy/#files and launch the setup.py file, but when I do this on python to check the installation:
import commpy
It gives me the following error:
File "C:\ProgramData\Anaconda3\lib\site-packages\commpy\__init__.py", line 17, in <module>
from filters import *
ModuleNotFoundError: No module named 'filters'
So it looks like the __init__.py file in that directory has broken imports somehow. I was able to fix it in vim by changing the import to:
init.py
from .filters import *
from .modulation import *
from .impairments import *
from .sequences import *
I'm not sure how that will impact other functionalities in the module, but that does allow me to run
import commpy
with no errors.
NOTE
It appears this behavior is further down in the module as well, so if you were to attempt
from commpy import channelcoding
it will raise similar exceptions. So you will have to do more surgery on the module in ./commpy/channelcoding/__init__.py:
from .convcode import Trellis, conv_encode, viterbi_decode
from .interleavers import *
from .turbo import turbo_encode, map_decode, turbo_decode
from .ldpc import ldpc_decode
from .gfields import *
from .algcode import *
Upon further inspection, the syntax of this library is python2
Are you able to tell me why I cannot use the request_kerberos module ? this is my code:
from django.http import HttpResponseNotFound ,HttpResponseRedirect
import requests
from requests_kerberos import HTTPKerberosAuth, OPTIONAL
I have already installed this module ,but when I'm opening the webpage I see that:
No module named winkerberos
I've checked the code and the problem is here ,kerberos.py file, first 4 lines:
try:
import kerberos
except ImportError:
import winkerberos as kerberos
winkerberos is for Windows OS and I'm using the CentOS
So, why my system cannot import that module ?