WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\~-mpy\\core\\multiarray.cp37-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
Although when I tried python -m pip install tensorflow in command prompt it installed the packagen, when I am trying to import Keras in Jupyter notebook I am getting above error.
It looks like you are on Windows. Open your command prompt as administrator and then type python -m pip install tensorflow --user. Let me know if this fixed your issue.
Related
I am installing TensorFlow in anaconda prompt but it stops due to the permission. I was wondering if anyone knows what should I do to fix that.
The commands I am using:
pip install --user virtualenv
pip install --upgrade tensorflow
The error that I get:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\scipy\\cluster\\hierarchy.py'
Consider using the `--user` option or check the permissions.
I want to use Parsey McParseface, and I'm following the installation instructions for SyntaxNet here: https://github.com/tensorflow/models/tree/master/research/syntaxnet#ubuntu-1604-binary-installation#ubuntu-1604-binary-installation
I'm using Ubuntu 18.04.1 LTS and the first 3 commands worked, but when I try to run
python -m jupyter_core.command nbextension enable --py --sys-prefix widgetsnbextension
I get the following error:
Error executing Jupyter command 'nbextension': [Errno 2] No such file or directory
(The Readme said to ask questions here using the syntaxnet tag)
I looked up other similar issues on StackOverflow and I've tried adding /home/[username]/.local/bin to PATH but that didn't fix it, as well as running this instead:
python -m jupyter_core.command /home/[username]/.local/bin/nbextension enable --py --sys-prefix widgetsnbextension
I also tried upgrading jupyter with
pip install -U jupyter
No matter what I do I still get the same error.
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
I'm trying to follow this guide to test this new algorithm: https://github.com/lalonderodney/SegCaps
I can't do it in my PC, so i'm using another server with Putty. Now I'm connected with the other server.
First of all I installed TensorFlow as indicates in the guide with :
pip install -r requirements.txt
After I wrote this code: ./main.py segcaps.png
in which segcaps.png is the image that i want to use
Finally I wrote python main.py --data_root_dir data
that is the only required parameter with the directory containing imgs and masks folders.
Now it gives me an error:
ModuleNotFoundError: No module named 'tensorflow.python.framework'
I searched it in the directory tensorflow/python/framework and it exists.
So, i don't know how to solve it. Ideas?
If you have multiple Python versions installed, then you'll (most likely) have multiple pip versions installed too. Make sure that the pip command you use installs the package(s) into the Python version you want it to. It may so happen that the package got installed into python2 but you wanted it in python3.
Since using pip did not install the packages in python3, pip3 is most likely to the PyPI for python3. Try
pip3 install -r requirements.txt
and that should work.
In case you have an EnvironmentError you can try this (bad idea):
pip3 install -r requirements.txt --user
This solves the problem most of the times on standalone machines. I'm not sure about the server; insufficient permissions might block this.
Why is the --user flag a bad idea? Read: What is the purpose “pip install --user …”?
You can use pip show tensorflow to see if it is installed or not.
As for ModuleNotFoundError try uninstalling keras and reinstalling an earlier version by pip install keras==2.1.6
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