ModuleNotFoundError: No module named 'magenta.protobuf' but I have installed it - python

I run in the magenta environment on my iMac the python file and I get the error:
ModuleNotFoundError: No module named 'magenta.protobuf'
Though I have tried:
pip install protobuf
pip3 install protobuf
pip install protobuf-compiler
pip3 install protobuf-compiler
Could anyone please help?

you can try this:
pip install note-seq
then
import note_seq.protobuf

Related

PIP Rediscluster ModuleNotFoundError: No module named 'redis._compat'

I am recently having problems with installing rediscluster. When I run pip install rediscluster, it runs it fine, but after a second, it just shows error ModuleNotFoundError: No module named 'redis._compat'. I have tried running pip install rediscompat, pip install redis.compat, pip install redis._compat and pip install redis_compat, but none of them worked. Anyone know how to get redis._compat?
I appreciate any help! Thanks
I tried running these commands:
pip install rediscompat, pip install redis.compat, pip install redis.\_compat and pip install redis_compat
And this was the result:
ModuleNotFoundError: No module named 'redis._compat'
And I expected this:
(not actually the result, but this is what I expected to happen) Successfully installed rediscluster and many other modules. I have not seen the result, but I atleast think that this would be the result.

How to resolve "ModuleNotFoundError: No module named 'package'" in notebook?

I installed a package in my notebook by running in a cell the following command:
!pip install packagename
but when I try to import the package, I'm getting the following error:
import packagename as pn
--> ModuleNotFoundError: No module named 'packagename'
I don't change my kernel between these commands, and also it seems installed correctly since running the install command again detects the installed package. I also tried re-installing it without success. What am I missing here?
To install any package on windows
pip install packagename
MacOS
python3 -m pip install packagename
Linux
sudo apt-get install packagename

pip3 can't install setupdocx without setuplib, but can't install setuplib without setupdocx?

I appear to be having a chicken and egg problem here. I'm trying to install setupdocx with the command:
sudo pip3 install setupdocx
and I recieve the error
ModuleNotFoundError: No module named 'setuplib'
So I try to install setuplib with the command:
sudo pip3 install setuplib
and I recieve the error
ModuleNotFoundError: No module named 'setupdocx'
I'm completely lost as to how I'm supposed to install these 2 modules. Any help would be greatly appreciated.

No module named 'cv2' during importing in python

I followed the instructions to install opencv in ubuntu from the link https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/#disqus_thread.
The module is installed properly. But when I import it in python I get the error "No module named 'cv2'"
What can I do?
If you are using Python3:
pip3 install opencv-python
To install the latest stable version of opencv-python 4.1.2.30 with pip, use the below command:
pip install opencv-python

TFTPy import, no module named tftpy

I installed TFTPy with both pip and pip3.
Then i followed the example on the TFTPy documentation, which follows:
import tftpy
server = tftpy.TftpServer('/tftpboot')
server.listen('0.0.0.0', 69)
But I get the error
ImportError: No module named tftpy
I also tried using from tftpy import tftpy. I tried using Python 2, Python 2.7 and Python 3, but still get the same error.
All help is appreciated
You can install tftpy by using command pip install tftpy. In case you do not have pip on your device, use the following commands:
yum -y install python-pip
pip install --upgrade pip
pip install tftpy

Categories

Resources