Error intsalling tensorflow via pip install - tensorflow

WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an EnvironmentError: [WinError 2] The system cannot find the file specified: 'c:\python38\Scripts\chardetect.exe' -> 'c:\python38\Scripts\chardetect.exe.deleteme'
I was trying to install Tensorflow via command pip install tensorflow. and after downloading everything at the end found this error..can anyone tell me why this happened?

According to https://www.codegrepper.com/ you can use these two:
In Windows
python -m pip install -U pip --user
In Linux
pip install -U pip --user

Related

I am trying to execute pip install fastapi[all] but it is not working

I want to install Fast API to my mac by entering pip install fastapi[all], it errors.
kanta#Kantas-MacBook-Air fastapi % pip install "fastapi[all]"
zsh: command not found: pip
kanta#Kantas-MacBook-Air fastapi % pip install fastapi[all]
zsh: no matches found: fastapi[all]
kanta#Kantas-MacBook-Air fastapi % pip install fastapi[all]
zsh: no matches found: fastapi[all]
kanta#Kantas-MacBook-Air fastapi % pip install 'fastapi[all]'
zsh: command not found: pip
kanta#Kantas-MacBook-Air fastapi %
I think it is because I am using a mac. Is there a workaround?
You can reach pip via -m flag:
-m mod : run library module as a script (terminates option list)
python3 -m pip install "fastapi[all]"
Note: use python3 or any other alias for your version e.g. python3.10.
Also, I may recommend creating venv for your project.
python3 -m pip install virtualenv
python3 -m virtualenv venv
source venv/bin/activate
pip install "fastapi[all]"
Please try :
pip3 install 'fastapi[all]'

cffi.error.VerificationError (undefined symbol: SSLv2_client_method) when running Google Cloud Datalab notebook

I'm trying to run this notebook on Google Cloud Datalab: https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/machine_learning/feateng/feateng.ipynb
While it was perfectly working yesterday, today running the first block results in cffi.error.VerificationError (undefined symbol: SSLv2_client_method).
Can you advise on how I can fix this?
I've tried to do the same from a different GC profile and the problem remains.
I've also tried to fix 'pip install' as described here: pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)". Doing this in Datalab causes the same error; doing this in Cloud shell outside Datalab doesn't change anything.
This has been answered on github by #ekuuni:
https://github.com/GoogleCloudPlatform/training-data-analyst/issues/313
%%bash
source activate py2env
conda install -y pytz
conda update -y pyopenssl
pip uninstall -y google-cloud-dataflow
pip install --upgrade apache-beam[gcp]
I needed these 2 more lines for it to work.
pip install tensorflow_transform
pip install tensorflow==1.9.0
A good workaround is using virtual environments rather than Datalab so you don't have to deal with version updates:
https://cloud.google.com/dataflow/docs/quickstarts/quickstart-python
I have successfully installed the following on python 2.7
apache-beam==2.7.0
tensorflow==1.11.0
tensorflow-transform==0.8.0

pip install tensorflow fails - MAC OSError: [Errno 13]

I am trying to install tensorflow on mac Sierra. When I run pip install tensorflow I get following report.
It works fine for me by using command :
pip3 install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.1-py3-none-any.whlrflow-1.10.1-py3-none-any.whl
run sudo pip install tensorflow
The problem appears to be, that you have not got the rights to install tensorflow globally. Therefore, one solution appears to be, that you try to install tensorflow locally using the following command:
pip install tensorflow --user

TensorFlow installation error: Operation not permitted .../_markerlib

Despite using sudo, the pip install command sometimes generates an error similar to the following:
...
Installing collected packages: setuptools, protobuf, wheel, numpy, tensorflow
Found existing installation: setuptools 1.1.6
Uninstalling setuptools-1.1.6:
Exception:
…
[Errno 1] Operation not permitted:
'/tmp/pip-a1DXRT-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'
Try to install using --ignore-installed option:
sudo pip install --ignore-installed tensorflow
It should work.

Getting permission denied error while installing tensorflow and keras

After following the steps from my previously asked question Can I implement deep learning models in my laptop with intel hd graphics
I am getting a permission denied error while installing tensorflow
What can I do to install tensorflow and keras without getting this error?
pip3 is trying to access /usr/bin/ for which you need superuser rights. Try
sudo pip3 install --upgrade ...
It appears that TensorFlow depends on a newer version of the setuptools package than you have installed. As Maximilian points out, pip needs root access to upgrade setuptools and install TensorFlow and Keras in your machine's Python distribution. You can either use sudo as he suggests, or it may be safer to install TensorFlow into a Virtualenv. For example, to create a Virtualenv in the directory ~/tensorflow, execute the following commands:
$ sudo pip install virtualenv
$ virtualenv --system-site-packages ~/tensorflow
$ cd ~/tensorflow
$ source bin/activate
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp27-none-linux_x86_64.whl