When trying to install a Python module on the Qualcomm® QCS610, some error messages occur. Python3 is used and the following commands are tried:
Python3 -m pip install tensorflow
**python3 -m pip install tflite **
The same error message comes up no matter what module is tried to install:
"Could not import runpy module
ImportError: No module named 'runpy'"
I thought ,I don't have access to the internet with myboard and assume Python wants to download the module over the internet. So I have found a way to download a module from My PC and then transfer it to the board using WinSCP and then install it from there as well.
I download the module "tflite-runtime" and keep it in Root .
By using " python3 -m pip install tflite_runtime-2.7.0-cp39-cp39-manylinux2014_x86_64.whl -f ./ --no-index"
By using this command , "tflite-runtime" module should have be installed ,however still showing same errros.
" Could not import runpy module
ImportError: No module named 'runpy'"
If anyone has an idea to solve this problem I appreciate it.
Thanks.
Deniz
Related
When I am running the command from cv2.ximgproc import guidedFilter, I am getting an error: ModuleNotFoundError: No module named 'cv2.ximgproc'
I searched the Internet for possible reasons, and I found out that I should run a command pip install opencv--contrib-python on the terminal, which I did. Even after doing that, I am getting the same error.
Please note that I am not very good at programming and technical stuff, so please explain in simple terms. I have a mac, and I am using Anaconda for writing my codes.
You need to uninstall the regular opencv package first.
First uninstall both regular opencv as well as contrib package:
pip uninstall opencv-python
pip uninstall opencv-contrib-python
Then install the contrib package:
pip install opencv-contrib-python
You can refer to this post for more information:
Module 'cv2.cv2' has no attribute 'ximgproc'
I have written a python script as follows:
from cv2.ximgproc import guidedFilter
print("hello")
Initially it was giving me the same error : 'ModuleNotFoundError: No module named 'cv2.ximgproc'. But then i ran the command "pip install opencv--contrib-python" and after that it prints "hello" i.e it is detecting the ximgproc module.
please check the below screenshot.
Check once the installation of opencv--contrib module. There is some problem at that stage.
I am trying to install ta-lib from a ubuntu console, I had a problem with python versions .. then activate virtual env.
But the problem is that if I install Ta-lib from the file, then when I am going to execute my program the following error comes up:
import talib as ta
ImportError: No module named 'talib'
I don't understand why if I already have the ta-lib library installed
I need to use from kneed import KneeLocator for Knee-point detection in Python, but everytime I try to import the module after closing the Jupyter notebook I always get ModuleNotFoundError: No module named 'kneed' error and I am forced to install it again. I am using Jupyter Notebook with Anaconda on a remote server that I do not have the access to. I am using its web client.
The module I am trying to install and use is from https://github.com/arvkevi/kneed
I have not faced this issue with any other libraries. All other libraries I just need to install just once.
What could be the reason behind that?
Could anybody help me understand why is it happening and how to solve this issue?
You might need to run this line of code first. That worked for me
!pip install --upgrade kneed
According the information you provide, you are using python3.X . try "python3 setup.py install" instead of "python setup.py install".
After you install the module, run python3 -c "help('help;)" to confirm you install the module successfully.
I have installed Python 3.6 using the instructions at https://gist.github.com/dschep/24aa61672a2092246eaca2824400d37f
For reasons I don't fully understand Python 3.6.5 was placed in
/home/pi/Python-3.6.5
and some modules were not available.
I installed RPi.GPIO into /home/pi/Python-3.6.5/Lib using
pip install RPi.GPIO -t .
Attempting to run a script with sudo python3.6 /home/pi/PythonProjects/omxcall_radar.py produces this error:
Traceback (most recent call last):
File "/home/pi/PythonProjects/omxcall_radar.py", line 18, in <module>
import RPi.GPIO as GPIO
ModuleNotFoundError: No module named 'RPi'
However the RPi directory is in the Lib directory
I am working at the limit of my linux skills. Can someone please explain why I am getting the error and/or what I may have done wrong in installing Python 3.6/RPi.GIPO?
There's a lot going on here.
The Python-3.6.5 directory in /home/pi is the Python source code. It's there because that's where you unpacked the Python-3.6.5.tar.xz archive you retrieved using wget. It is not where Python was installed.
When you ran sudo make altinstall, that installed Python into /usr/local (specifically, the binary itself would be /usr/local/bin/python3.6).
When you ran pip install RPi.GPIO -t ., you installed the RPi.GPIO module into your current directory, but that's not anywhere that your newly installed Python would look for it. Additionally, the pip you were using doesn't know anything about your new Python install, either.
After running make altinstall, you should probably do the following:
Install pip for your new Python install:
easy_install-3.6 pip
Use pip3.6 to install RPi.GPIO:
pip3.6 install RPi.GPIO
Finally, run your script using your new Python:
python3.6 /home/pi/PythonProjects/omxcall_radar.py
You may or may not need sudo, depending on what sort of access your script requires.
Using the Mac Os Terminal, I downloaded the Jupyter lightning module using "pip install lightning-python" in the /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages directory.
However, when I try to import it, I get the error, No module named 'lightning'
and when I list out the files in the site-packages directory, the module doesn't appear.
You are getting the error because you used pip. pip basically is for version 2 of python. for using it for pip3, you should first install pip3 package. Then copy all your dependencies to python3 libraries.
Hope that answers the question.