How to fix the problem: No module named 'google.protobuf.reflection' - python

when I import syft in Python3.7, it says: ModuleNotFoundError: No module named 'google.protobuf.reflection'.
when I import TensorFlow, it says: ImportError: cannot import name 'descriptor' from 'google.protobuf' (unknown location).
How to solve these two problems?
The related software information are:
Mac OSX
Python3.7.3
protoc version is 3.8.0
pip3 is located in:/Users/susan/anaconda3/bin/pip3

Uninstall google and protobuf and install them again
pip uninstall protobuf
pip uninstall google
pip install google
pip install --upgrade protobuf
The most important thing is that you should use the latest stable version of protobuf.

Related

How to install win32gui on anaconda on macOS

I am getting the error 'ModuleNotFoundError: No module named 'win32gui''. Please brief me the instructions on how can I resolve this issue on my anaconda on mac.
You must install it from the version hosted on the pip package manager. You can do this with the following command:
pip install win32gui

ImportError: DLL load failed while importing cv2: The specified module could not be found in pycharm with python 3.9

I have already installed opencv-python library but when i import it into the the compiler it does not work. I have also tried to install it using pip install opencv-python but it says Requirement already satisfied:. Which means that library is installed but still not works. I am using pycharm community edition and python 3.9.
try to install this
pip install opencv-python-headless

Installing a repo not in PyPI

This is my first time trying to install a repo not in PyPI. I'm not sure if I'm having a general issue or a specific issue with the package.
Repo:
https://github.com/jeslago/epftoolbox
Instructions are:
git clone https://github.com/jeslago/epftoolbox.git
cd epftoolbox
Then, simply install the library using pip:
pip install .
I've tried several approaches.
I tried adding the repo in Pycharm, as "https://github.com/jeslago/epftoolbox.git/" in the settings.
I tried using pip install from a local version of the repo
python -m pip install C:\Users\user\epftoolbox\
I tried installing in anaconda
git clone https://github.com/jeslago/epftoolbox.git
cd epftoolbox
pip install .
I get this error
Successfully built epftoolbox termcolor
ERROR: tensorflow 2.3.0 has requirement scipy==1.4.1, but you'll have scipy 1.5.2 which is incompatible.
But it finishes with "Successfully installed epftoolbox-1.0"
The issue is that I can do "import epftoolbox"
Fine. But if I try and run a script with "from epftoolbox.data import read_data"
I get the error
ModuleNotFoundError: No module named 'epftoolbox.data'
So I take it that the package didn't actually install?
I'm not sure what to try next?
I've python 3.8.5 installed 64 bit.
I've get the same issue in pycharm and idle.
Probably you need to install specific version of scipy to work with this library, try to uninstall current version and then install the correct version with this commands:
python -m uninstall scipy
python -m install -Iv scipy==1.4.1

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

OpenCV install on Python 3.6: ModuleNotFoundError

I am getting the following error when using import cv2:
ModuleNotFoundError: No module named 'cv2'
My version of Python is 3.6 64 bit. I have downloaded the whl file to install it via pip manually, and have also installed it with pip install opencv-python however I still get ModuleNotFoundError.
pip outputs Requirement already satisfied: opencv-python in c:\...\python36\site-packages
Help would be much appreciated.
Your download must have been corrupted. It happened to me too. Simply uninstall the package and use
sudo apt-get install python open-cv
Use pip install -U opencv-python

Categories

Resources