ModuleNotFoundError: No module named 'JayDeBeApi3' - python-3.x

I don't understand why Python3 is giving me an module not find error on importing JayDeBeApi3 module.
import JayDeBeApi3
ModuleNotFoundError: No module named 'JayDeBeApi3'
Please below, JayDeBeApi3 is successfully installed
pip3 install JayDeBeApi3
Collecting JayDeBeApi3
Using cached JayDeBeApi3-1.3.2.tar.gz
Requirement already satisfied: py4j in /usr/local/lib/python3.6/site-packages (from JayDeBeApi3)
Installing collected packages: JayDeBeApi3
Running setup.py install for JayDeBeApi3 ... done
Successfully installed JayDeBeApi3-1.3.2
BELOW IS PYTHONPATH SETTING
Python 3.6.0 (default, Nov 27 2017, 11:04:30)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import sys
print (sys.path)
['', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/root/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/site-packages']
# locate JayDeBeApi3
usr/local/lib/python3.6/site-packages/JayDeBeApi3-1.3.2-py3.6.egg-info
/usr/local/lib/python3.6/site-packages/JayDeBeApi3-1.3.2-py3.6.egg-info/PKG-INFO
/usr/local/lib/python3.6/site-packages/JayDeBeApi3-1.3.2-py3.6.egg-info/SOURCES.txt
/usr/local/lib/python3.6/site-packages/JayDeBeApi3-1.3.2-py3.6.egg-info/dependency_links.txt
/usr/local/lib/python3.6/site-packages/JayDeBeApi3-1.3.2-py3.6.egg-info/installed-files.txt
/usr/local/lib/python3.6/site-packages/JayDeBeApi3-1.3.2-py3.6.egg-info/requires.txt
/usr/local/lib/python3.6/site-packages/JayDeBeApi3-1.3.2-py3.6.egg-info/top_level.txt

Downloading JayDeBeApi3 1.3 from https://pypi.python.org/pypi/JayDeBeApi3/1.3 and installing it locally resolved the issue for me. Though, I am sure, that's not an actual solution.

Related

Unable to import mlflow, getting ModuleNotFoundError: No module named 'mlflow'

Unable to import mlflow in a .py script.
ModuleNotFoundError: No module named 'mlflow'
The script runs in a python:3.7-stretch Docker container
Use requirements.txt to pip install packages.
(...)
sqlalchemy==1.4.1
psycopg2==2.8.6
mlflow==1.18.0
RUN pip3 install --default-timeout=5000 --use-deprecated=legacy-resolver -r /root/requirements.txt
Can see that it is installed.
root#abc:~# pip uninstall mlflow
Found existing installation: mlflow 1.18.0
Uninstalling mlflow-1.18.0:
Would remove:
/usr/local/bin/mlflow
/usr/local/lib/python3.7/site-packages/mlflow-1.18.0.dist-info/*
/usr/local/lib/python3.7/site-packages/mlflow/*
Proceed (y/n)? n
Can do an import from python shell.
root#abc:~# python
Python 3.7.10 (default, Feb 16 2021, 19:46:13)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import mlflow
>>>
But no joy when running from .py script.
Other packages installed from requirements.txt can be imported.
Any ideas what is wrong ?

Has anybody figured out how to use pywin32 in a virtual environment?

People have been trying for years to get pywin32 to work inside a virtual environment, and it seems nobody has succeeded yet. At least, all the unanswered questions about how to do it are swamping the few questions that have received answers. I need to have my Python script use COM to communicate with an ActiveX program, and so I need win32com.client.Dispatch(), and so I need pywin32. I've read that pypiwin32 is the currently favored module, but it depends on pywin32.
I can load pywin32 into my registered copy of Python with no trouble, but I want to be able to use a virtual environment based on the 32-bit version of Python 3.8.
So how do I do it? If I need a 64-bit version of Python, I can switch, but I'd rather not.
Here is what happens when I tried it using a venv based on 64-bit Python 3.8 on my Win10 box:
(venv) C:\misc\venv_test\venv\Scripts>python
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
(venv) C:\misc\venv_test\venv\Scripts>pip install pywin32
Collecting pywin32
Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32
(venv) C:\misc\venv_test\venv\Scripts>pip install c:\misc\pywin32-227-cp38-cp38-win32.whl
pywin32-227-cp38-cp38-win32.whl is not a supported wheel on this platform.
(venv) C:\misc\venv_test\venv\Scripts>pip install c:\misc\pywin32-227-cp38-cp38-win_amd64.whl
pywin32-227-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
And on a venv based on the 32-bit version of Python 3.8:
(venv) T:\Worthington Steel\Scripts Python3\venv\Scripts>python
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
(venv) T:\Worthington Steel\Scripts Python3\venv\Scripts>pip install pywin32
Collecting pywin32
Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32
(venv) T:\Worthington Steel\Scripts Python3\venv\Scripts>pip install c:\misc\pywin32-227-cp38-cp38-win32.whl
pywin32-227-cp38-cp38-win32.whl is not a supported wheel on this platform.
(venv) T:\Worthington Steel\Scripts Python3\venv\Scripts>pip install c:\misc\pywin32-227-cp38-cp38-win_amd64.whl
pywin32-227-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
(venv) T:\Worthington Steel\Scripts Python3\venv\Scripts>

ModuleNotFoundError when importing package that is installed in conda environment

Unable to import flask-migrate dependencies that are missing python version/sub-version from build version (3rd column of conda list output).
Flask-migrate was installed from conda-forge using:
conda install -c conda-forge flask-migrate
Several dependencies were installed simultaneously and are found in conda list -n venv but cannot be imported to python.
(venv) C:\Users\Colin\Documents\Projects\microblog>python
Python 3.6.8 |Anaconda, Inc.| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import alembic
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'alembic'
From what I have found, the packages that are raising ModuleNotFoundErrors upon import are all missing the python version in the 3rd column of conda list.
Successfully import: py36_0 or py36_1000 or py36* etc.
ModuleNotFoundError: py_0 or py_1
Why are installed packages raising ModuleNotFoundError when imported to python?
I believe the packages with py_0 environment were all installed as Noarch packages from conda. I'm not sure why my system is unable to import the Noarch packages but I was able to work around the problem by manually downloading the win64-py36_0.tar.bz2 files and installing them locally using:
conda install /package-path/package-filename.tar.bz2

Linux pyarrow undefined symbol

I am running Python 3.7.2 and using Miniconda3 to create a new environment named test-env. I have installed the pyarrow package from the default channel into this environment; however, when I try and import pyarrow, the Python interpreter gives me an undefined symbol error:
Import Error: /test-env/lib/python3.7/site-packages/pyarrow/lib.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNK5arrow6Status8ToStringB5cxx11Ev
From other threads on SO, I gather that this is due to a compiler incompatibility. I'm not a developer so I'm not sure how to fix this.
I had the same error after I installed by conda install, after I conda uninstall, I did pip install, the issue went away.
>>> import pyarrow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dv6/anaconda3/envs/spark/lib/python3.6/site-
packages/pyarrow/__init__.py", line 54, in <module>
from pyarrow.lib import cpu_count, set_cpu_count
ImportError: /home/dv6/anaconda3/envs/spark/lib/python3.6/site-
packages/pyarrow/lib.cpython-36m-x86_64-linux-gnu.so: undefined symbol:
_ZNK5arrow5Field8B5cxx11Ev
>>> quit()
Then I conda uninstall
(spark) dv6#dv6:~$ conda uninstall pyarrow
Then I pip install
(spark) dv6#dv6:~$ pip install pyarrow --user
Collecting pyarrow
Downloading pyarrow-0.16.0-cp36-cp36m-manylinux2014_x86_64.whl (63.1 MB)
|████████████████████████████████| 63.1 MB 25 kB/s
Requirement already satisfied: numpy>=1.14 in
./anaconda3/envs/spark/lib/python3.6/site-packages (from pyarrow) (1.18.1)
Requirement already satisfied: six>=1.0.0 in
./anaconda3/envs/spark/lib/python3.6/site-packages (from pyarrow) (1.14.0)
Installing collected packages: pyarrow
Successfully installed pyarrow-0.16.0
(spark) dv6#dv6:~$ python -c "import pyarrow"
(spark) dv6#dv6:~$
Here is my Python version
(spark) dv6#dv6:~$ python
Python 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
I would recommend opening a ticket at https://issues.apache.org/jira/projects/ARROW/issues/ARROW-4774?filter=allopenissues
Provide how you installed pyarrow (pip or conda), which distribution of linux. If you can reproduce this in a clean environment, even better.

Something wrong with scikits.talkbox with Python3?

I am migrating a Python program from 2.10 to 3.6. The packages scikits.talkbox is part of it. However, I cannot figure out how to use it any more. The installation from pip seems to work fine but I cannot import it. Has anyone faced this problem before ?
[manjaro#manjaro-pc ~]$ python --version
Python 3.6.0
[manjaro#manjaro-pc ~]$ sudo pip install scikits.talkbox
Collecting scikits.talkbox
Using cached scikits.talkbox-0.2.5.tar.gz
Requirement already satisfied: numpy in /usr/lib/python3.6/site-packages (from scikits.talkbox)
Installing collected packages: scikits.talkbox
Running setup.py install for scikits.talkbox ... done
Successfully installed scikits.talkbox-0.2.5
[manjaro#manjaro-pc ~]$ python
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scikits.talkbox
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/scikits/talkbox/__init__.py", line 5, in <module>
__all__ += tools.__all__
AttributeError: module 'tools' has no attribute '__all__'
The answer to your question is this link Error while importing scikits.talkbox
Even I am facing this issue
I have switched to librosa
There is another way for MFCC features: python_speech_features
http://python-speech-features.readthedocs.io/en/latest/

Resources