I try to install caffe but I still have a problem in the installation, I tried several tutorials but still I couldn't do it
File "/home/lynda/caffe/python/caffe/proto/caffe_pb2.py", line 6, in
from google.protobuf.internal import enum_type_wrapper
ModuleNotFoundError: No module named 'google'
You are missing the module google . You need to install it
sudo python3 -m pip install google
or
sudo python -m pip install google
Related
I am following the installation guide for the Tensorflow Object Detection API, which determines the following:
//From within TensorFlow/models/research/ cp object_detection/packages/tf2/setup.py . python -m pip install --use-feature=2020-resolver .
When I run the second command, I the error:
/usr/bin/python: No module named pip
I have pip3 installed, as well as python2 and python3. What are my options here? Install a custom outdated pip file, which could possibly conflict with pip3?
Link to the tutorial: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tensorflow-object-detection-api-installation
Tried installing python-pip from command line, it points to the pip3 package, so I need to find a way to use the old pip package, without breaking the newer pip one.
I'd like to use python3.10 for match pattern feature.
I was previously using python3.8 on ubuntu20.04 with wsl2 without issue.
When using python3.10, a script importing from google.cloud fails
To install python3.10, I did:
adding sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10
I installed venv:
python3.10 -m venv venv
. venv/bin/activate
and once activated , I ran python3.10 -m pip install google.cloud
and also python3.10 -m pip install google
Installation of google.cloud semt ok
Nevertheless when I run once venv activated the following script
#!/usr/bin/python3.10
from google.cloud import bigquery
# Construct a BigQuery client object.
client = bigquery.Client()
I get the following error message:
Traceback (most recent call last):
File "/home/ced/bigquery-gcloud/./survival_frequency", line 2, in
from google.cloud import bigquery
ModuleNotFoundError: No module named 'google'
Thanks for your help
actually, looking directly in env/lib/python3.10/site-packages/google_cloud-0.34.0.dist-info/METADATA, it is said that this package doesn't install anything after june 2018 and that it is necessary to get packages directly from other sources. On pypi, the google.cloud package supports python version <=3.9. I guess I'll have to wait till google.cloud gets some support for python3.10
I want to install edward2 library: https://github.com/google/edward2.
I used this command: pip install "git+https://github.com/google/edward2.git#egg=edward2". But when I want to import it in spyder it had an error:
ModuleNotFoundError: No module named 'edward2'.
Could someone help me to install it with conda?
Using Ubuntu 16.04 with Python 3.5 I get import errors for some packages, e.g. 'BeautifulSoup4' or 'requests'. Both libraries are installed from the Ubuntu repositories:
$ dpkg --get-selections | grep -E "python3-req|python3-bs"
python3-bs4 install
python3-requests install
Yet I get "ImportError: no module named 'bs4'/'requests'".
$ python3 -c "import bs4"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'bs4'
Only when I (additionally!) install those libraries via pip3 it works. The documentation of BeautifulSoup says to install it as "python3-bs4" via apt. Why does it only work with the pip3 method? What's the purpose of the python3-bs4/python3-requests packages?
I was able to resolve the issue.
I'm still not quite sure what was the exact problem, but I suspect that pip3 and apt confused each other about what was actually installed. pip3 also listed several python packages which were installed via apt.
I removed/purged everything via apt that was recognized by pip3 list and also purged pip3. Then I apt install --reinstall the packages that gave me trouble previously: python3-bs4 and python3-requests. The requests library still didn't work because it missed the packages python3-six, python3-chardet and python3-urllib3 which where reported as already installed by apt. A apt install --reinstall fixed this as well. And then it worked!
I'm trying to get a program called hangoutsbot
to work on my linux server. I'm currently using a digital ocean server. However, every time I try to run the script it gives me an error that says:
ImportError: No module named 'appdirs'
I'm not sure what to do here. I've already tried installing appdirs from npm to no avail. This script works fine on my mac, however it doesn't seem to want to run on my linux server. Any help would be appreciated.
I ran across the same problem after solving the "missing pyparsing module" bug over here. I then started getting this error:
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 74, in <module>
import appdirs
ImportError: No module named appdirs
I then used the manual installation steps there to find the missing package on pypi.python.org and came up with this manual installation sequence:
wget https://pypi.python.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz
gunzip appdirs-1.4.3.tar.gz
tar -xvf appdirs-1.4.3.tar
cd appdirs-1.4.3
sudo python setup.py install
And that fixed it!
For some reason your pipenv installation is not completely done, maybe if you just uninstall and install all missing packages again, it can works. For example, if you are using a MAC:
sudo pip uninstall <missing packages> and after sudo pip install <missing packages>
In this specific case:
sudo pip uninstall appdirs and sudo pip install appdirs
When you run hangoutsbot you'll need to specifically call the python version that has the modules installed. The following worked for me and I had python3.4 and python3.5 installed.
python3.5 hangoutsbot/hangoutsbot.py -d
I had this issue on Ubuntu 14.04 , which ships with a really old version of pip. I was using python 2.7. Upgrading to a newer version of pip with "pip install --upgrade pip" solved this issue for me. (I did this within my virtualenv, but could be needed at the system level depending on what you are trying to do.)
This was where I discovered the solution:
https://www.reddit.com/r/Python/comments/5pwngp/setuptools_34_has_been_released_and_breaks_with/