so Ive been trying to install TensorFlow on my Rasberry Pi 3 (B) running Raspbian Strech using pip, but no matter what I try, I get the same error:
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
tensorflow from https://www.piwheels.org/simple/tensorflow/tensorflow-1.13.1-cp35-none-linux_armv7l.whl#sha256=6c00dd13db0791e83cb08d532f007cc7fd44c8d7b52662a4a0065ac4fe7ca18a:
Expected sha256 6c00dd13db0791e83cb08d532f007cc7fd44c8d7b52662a4a0065ac4fe7ca18a
Got 9d1adf39793da3e45661aadc026f9166e893071f4626bfa863c0ee7867dc63ba
This error always shows up in the middle of installation at random points
I've updated pip and tried using pip3 but none of them work...
This is wat I've tried so far:
sudo python3 -m pip install tensorflow
and
sudo pip3 install tensorflow
Both of them show the same error
I believe that tensorflow can only run on 64-bit python. I would check to see what version of python you are trying to install with.
Related
I am just starting in python and am trying to experiment with cv2, but whenever I try to import it I get the same error:
Import "cv2" could not be resolved
I have tried every possible way of installing it, I have tried
sys.path.append('/usr/local/lib/python39/site-packages)
which I've seen on one of the posts, I have also swapped between versions (tried 3.7). When I try it in pycharm, and I hover ower it because it gives me an error and an option to install it where I get an error named
Non-zero exit code (2)
Pycharm image:
Vscode image:
You're using wrong command to install the library. Always check the command on a website with corresponding package documentation like this one: https://pypi.org/project/opencv-python/
So the command you need will be
pip install opencv-python
if this still doesn't work, try different variations:
pip3 install opencv-python
or
python -m pip install opencv-python
I have been stuck on a module not found error of python3.
I have a VM on Microsoft Azure, a Centos 7. Then I installed python3 and pip3, and some packages I needed. But there’s one package that I just couldn’t find after I installed it
sudo pip3 install --user stockstats
But whenever i wanted to run a python script using this package, there’s
ModuleNotFoundError: No module named 'stockstats'
What I tried:
pip3 show stockstats
As I really want to see where it was installed. It shows nothing. What it is supposed to do is like this:
Name: openpyxl
Version: 3.0.7
Summary: A Python library to read/write Excel 2010 xlsx/xlsm files
Home-page: https://openpyxl.readthedocs.io
Author: See AUTHORS
Author-email: charlie.clark#clark-consulting.eu
License: MIT
Location: /usr/local/lib/python3.6/site-packages
…
Then I guess it might be something wrong with the installed path, so I uninstalled the package, and then did
sudo pip3 install stockstats --install-option="--prefix=/usr/local/lib"
(I am just guessing if openpyxl is installed there then stockstats should be there too, as python imported openpyxl successfully)
That didn’t work as well, the error still persists.
*I didn’t use any package manager other than pip3.
** some irregularities occurred when I was trying to use python3(see this post). It was resolved, but I am not sure if the error in this post is related to that.
Any help or hint would be appreciated ;)
Thanks all for the prompt reply.
After Guo Lei’s comment, I tried downloading the tar ball for this package and installing it myself without pip, which eventually told me what exactly happened: a module named int-date, required by stockstats, was not installed in the python library directory. After I installed it in the proper directory, the issue is resolved.
As Danila Vershinin and phd had pointed out, I really shouldn’t run pip as root, and that is the source of issue(curiously, however, that only one particular module required by stockstats is installed in /root/.local/lib/. All others are in the right place, maybe I added the prefix flag without remembering it...?)
Still, I am not sure, I ran pip using sudo because I received permission denied errors repeatedly — so should I use something like sudo --user? Or sth else?
This works for me.
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple stockstats
or
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install stockstats
You can visit This website for Installing pip in centos 7 Pip Install In Centos 7
for maybe some errors in installing pip.
reinstall python.
check that the module name is correctly typed
install stockstats in pip like "pip install stockstats" (getten from pypi.com)
I'm trying to remove Numpy on a Raspberry Pi 4 machine (Rasbian) but can't figure it out. I got a Permission Denied error when I output:
pip uninstall numpy
I tried with root privilege but got a pip: command not found error.
As very often the problem seems to be related to pip installation, so I tried to reinstall it. First when I check pip version with pip -V I got:
pip 20.0.2 from /home/pi/.local/lib/python3.7/site-packages/pip (python 3.7)
So I guess pip is install locally for the user but not for root. I removed everything using apt:
sudo apt remove python-pip python3-pip python-numpy python3-numpy
But pip is not removed, when I issue pip -V I still got pip version and location on the console.
any idea where to look for for debugging this?
P.S.: there is nothing special in .bashrc, just a export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH.
P.P.S: Python and Python" are in /usr/bin/
P.P.P.S: I'm trying to uninstall Numpy because when I'm importing it I receive the following error:
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
1. Check that you expected to use Python3.7 from "/usr/bin/python3",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.18.2" you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory
I am having following attached error as screen shot while installing pip install softlayer for windows 7 Laptop.
Please see the attached screen shot.
Unfortunately this is a unknown issue (not reproducible, I'm using python 2.7.12), there is no any report about this:
https://github.com/softlayer/softlayer-python/issues
As Harald's suggestion you can test:
Installing another packages
Try with another python version
If the issue is still reproducible, try to provide more information about the pip and python versions that you have installed (pip --version and python --version). Also if you have another additional libraries installed (pip list), in order to discard that one of them is causing a conflict.
I recently formatted my hard drive and got rid of Windows and went to Linux. I had a program that used to work fine before the reformat but isn't working fine now.
I believe it was written for 3.4 and not 2.7 since I used import tkinter and not import Tkinter. In either case the program won't run now that I have made the switch over. In 2.7 it does nothing...it acts like it has run through the code and then stops and gives me back the cursor when it should be popping up a t/Tkinter window displaying a graph. In 3.4 I get the error saying numpy isn't installed.
When I apt-cache policy python-numpy it comes up showing it 1:1.8.2 is installed. When I do the same for scipy it shows 0.13.3 is installed. Seeing from other websites when I check for cython it shows 0.20.1+git90-gee6e38e is installed. When I check for tk it comes up 8.6.0 is installed.
I'm a bit lost. Why I do get the error code saying numpy isn't found when I got to run the program yet it is installed. What do I have to do to get this program back up and running again.
I think you have the librairies installed for Python 2... Did you use pip to install the librairies ?
Try :
pip3 install numpy
And same for your other librairies.
If you use Ubuntu then you have 2 versions of python executables - python and python3. So I think you need to install dependencies for python3 version by sudo pip3 install numpy or sudo apt-get install python3-numpy if it exists in repos.