I just did a pip install of pyopendata using Python 3.5.1 (Anaconda distribution).
The install completed without errors. "import pyopendata" failed:
ImportError: no module named pyopendata.io
I can see the io module in github but it did not download.
Related
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
I am building a web scraper and I am trying to import the 'requests' package but I am getting an error. I am being told the following:
ModuleNotFoundError: No module named 'requests'
Full Error:
(venv) USERs-MacBook-Pro:Scraper user$ /usr/local/opt/python#3.9/bin/python3.9 /Users/user/git/ML/Python/Practice/Scraper/Scraper.py
Traceback (most recent call last):
File "/Users/user/git/ML/Python/Practice/Scraper/Scraper.py", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Steps I took when setting up project:
python3 -m venv project_name/venv
source project_name/venv/bin/activate
python3 -m pip install SomePackage
Confirmation package and dependences were installed:
(venv) USERs-MacBook-Pro:Scraper user$ pip list
Package Version
---------- ---------
certifi 2020.12.5
chardet 4.0.0
idna 2.10
pip 20.2.3
requests 2.25.1
setuptools 49.2.1
urllib3 1.26.2
By using the absolute path to system Python like that:
/usr/local/opt/python#3.9/bin/python3.9 /Users/user/git/ML/Python/Practice/Scraper/Scraper.py
you are using system's Python 3.9 and the packages that are installed for that one although you are in a virtual environment.
When creating a virtual environment you are creating a separate environment with the specified python version and all the packages you install with pip are installed to this environment and this python version.
You can better understand that if you run:
which python
inside your virtual environment.
This will show you the python that is used when you run python inside your venv and it's going to be different than
/usr/local/opt/python#3.9/bin/python3.9
So, by having installed requests using pip inside your environment, it is installed in the environments python which is executed when you run just python.
To sum up, to use the packages installed inside your venv with pip you should run your script (after activating the venv) with:
python /Users/user/git/ML/Python/Practice/Scraper/Scraper.py
I am trying to create a small lib package. I use Python 3.6.7 on Windows and Linux.
This is my directory structure:
my_lib\
setup.py
README.md
my_lib\
libname.py
__init__.py
tests\
test.py
For wheel creation I use: python setup.py bdist_wheel
From another machine I do: (venv) pip install my_lib.whl
But when I try to import the module it says: ModuleNotFoundError: No module named 'my_lib.libname'
When I do 'pip list' there is a package 'my-lib'
When I run python help('modules') there is a module my_lib
Is there any way to resolve this error without fixing sys.path?
Actually global pip uninstall pytest and then (venv)pip install pytest helped locally. Still need a solution for remotes
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 am using Windows 10 and Python 3.7 and facing this error from [Crypto.Cipher import AES "ModuleNotFoundError: No module named 'Crypto'"]
Already installed this successfully:
C:\Users\Zeeeshan Abbas>pip install pycryptodomex
Collecting pycryptodomex
Downloading https://files.pythonhosted.org/packages/2d/ec/1cd58f9e16980db055b5ab501e8833456ca0af1e3fef190e73a0c8674cc4/pycryptodomex-3.8.2-cp37-cp37m-win32.whl (10.0MB)
|████████████████████████████████| 10.0MB 384kB/s
Installing collected packages: pycryptodomex
Successfully installed pycryptodomex-3.8.2
But still facing the error:
D:\Coursera\Python\venv\Scripts\python.exe D:/Coursera/Python/ctr.py
Traceback (most recent call last):
File "D:/Coursera/Python/ctr.py", line 11, in
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
D:\Coursera\Python\venv\ "venv" stands for virtual environment, so this is where you need to install pycryptodomex . Make sure you activate the virtual environment D:\Coursera\Python\venv\Scripts\activate. Then run the pip install pycryptodomex