Related
I'm encountering an issue while executing an Apache Beam pipeline in Dataflow (using DirectRunner).
I have a requirements.txt file containing apache-beam[gcp] among other libraries.
Following is the error TraceBack:
2021-08-04 12:08:24.574 | INFO | apache_beam.runners.portability.stager:_populate_requirements_cache:646 - Executing command: ['/usr/bin/python3', '-m', 'pip', 'download', '--dest', '/tmp/dataflow-requirements-cache', '-r', '$PATH/requirements.txt', '--exists-action', 'i', '--no-binary', ':all:']
2021-08-04 12:09:04.694 | ERROR | main:process:102 - An error has been caught in function 'process', process 'MainProcess' (13060), thread 'Thread-4' (140614797276928):
Later at the end, I got the following error:
WARNING: Discarding https://files.pythonhosted.org/packages/f1/23/62d3e82fa4c505f3195315c8a774b2e656b556d174329aa98edb829e48bc/grpcio-1.29.0.tar.gz#sha256=a97ea91e31863c9a3879684b5fb3c6ab4b17c5431787548fc9f52b9483ea9c25 (from https://pypi.org/simple/grpcio/).
Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement grpcio<2,>=1.29.0 (from apache-beam[gcp]) (from versions: 0.4.0a0, 0.4.0a1, 0.4.0a2, 0.4.0a3, 0.4.0a4, 0.4.0a5, 0.4.0a6, 0.4.0a7, 0.4.0a8, 0.4.0a13, 0.4.0a14, 0.5.0a0, 0.5.0a1, 0.5.0a2, 0.9.0a0, 0.9.0a1, 0.10.0a0, 0.11.0b0, 0.11.0b1, 0.12.0b0, 0.13.0, 0.13.1rc1, 0.13.1, 0.14.0rc1, 0.14.0, 0.15.0, 1.0.0rc1, 1.0.0rc2, 1.0.0, 1.0.1rc1, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.3, 1.2.0, 1.2.1, 1.3.0, 1.3.5, 1.4.0, 1.6.0, 1.6.3, 1.7.0, 1.7.3, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.6, 1.9.0rc1, 1.9.0rc2, 1.9.0rc3, 1.9.0, 1.9.1, 1.10.0rc1, 1.10.0rc2, 1.10.0, 1.10.1rc1, 1.10.1rc2, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1rc1, 1.11.1, 1.12.0rc1, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0rc3, 1.13.0, 1.14.0rc1, 1.14.0rc2, 1.14.0, 1.14.1, 1.14.2rc1, 1.14.2, 1.15.0rc1, 1.15.0, 1.16.0rc1, 1.16.0, 1.16.1rc1, 1.16.1, 1.17.0rc1, 1.17.0, 1.17.1rc1, 1.17.1, 1.18.0rc1, 1.18.0, 1.19.0rc1, 1.19.0, 1.20.0rc1, 1.20.0rc2, 1.20.0rc3, 1.20.0, 1.20.1, 1.21.0rc1, 1.21.1rc1, 1.21.1, 1.22.0rc1, 1.22.0, 1.22.1, 1.23.0rc1, 1.23.0, 1.23.1, 1.24.0rc1, 1.24.0, 1.24.1, 1.24.3, 1.25.0rc1, 1.25.0, 1.26.0rc1, 1.26.0, 1.27.0rc1, 1.27.0rc2, 1.27.1, 1.27.2, 1.28.0.dev0, 1.28.0rc1, 1.28.0rc2, 1.28.0rc3, 1.28.1, 1.29.0, 1.30.0rc1, 1.30.0, 1.31.0rc1, 1.31.0rc2, 1.31.0, 1.32.0rc1, 1.32.0, 1.33.0rc1, 1.33.0rc2, 1.33.1, 1.33.2, 1.34.0rc1, 1.34.0, 1.34.1, 1.35.0rc1, 1.35.0, 1.36.0rc1, 1.36.0, 1.36.1, 1.37.0rc1, 1.37.0, 1.37.1, 1.38.0rc1, 1.38.0, 1.38.1, 1.39.0rc1, 1.39.0)
ERROR: No matching distribution found for grpcio<2,>=1.29.0
I use pip 21 and python 3.8
Did anyone already had a similar issue, and found a way to resolve it ?
Thanks
SOLVED !!
I finally found out what were the issue. I didn't specify the image tag of my Dataflow docker worker. So the job starts looking for a worker image version and started installing some dependencies, which causes this kind of error.
I then had to export environment variable DATAFLOW_WORKER_DOCKER_IMAGE_TAG and everythuing worked very well
I am attempting to install a specific version of tensorflow as part of the requirements for some code I'm trying to use (https://github.com/serengil/deepface)
When I attempt to install it like I normally do in command prompt I get the following.
C:\Windows\system32>pip install tensorflow==1.9.0
ERROR: Could not find a version that satisfies the requirement tensorflow==1.9.0 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 2.0.0a0, 2.0.0b0, 2.0.0b1, 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2, 2.1.0, 2.1.1, 2.1.2, 2.2.0rc0, 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1)
ERROR: No matching distribution found for tensorflow==1.9.0
I have referenced a few other Stackoverflow questions (Installing Tensorflow 1.9 in Windows) and haven't been able to find a solution or how to go about getting the version needed.
tensorflow==1.9.0 is available on PyPI (link). Your issue is that you are probably using Python 3.7, which 1.9.0 doesn't support, only Python 2.7 and 3.3 to 3.6. Install 64bit Python 3.6 and use it instead of 3.7.
Until recently I was able to install the tensorflow 1.5.0 package when using python 3.6.7 on windows. Now I can't and from the message "from version" below it seems that no tensorflow package is available at all.
Did the support stop recently?
Some additional information taking into account the comments from micha137 and hoefling:
In linux, tensorflow is available in many flavors. This is the case with pip version 9.0.3, 10.0.1, and 18.1 I tried.
For example:
(env3)xxx#xxx-linux:/local/mnt/workspace/tmp$ pip install tensorflow==
Collecting tensorflow==
Could not find a version that satisfies the requirement tensorflow== (from versions: 0.12.0rc0, 0.12.0rc1, 0.12.0, 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0)
No matching distribution found for tensorflow==
(env3)xxx#xxx-linux:/local/mnt/workspace/tmp$ pip --version
pip 18.1 from /local/mnt/workspace/tmp/env3/lib/python3.4/site-packages/pip (python 3.4)
By contract, in Windows:
C:\tmp>pip --version
pip 18.1 from c:\users\xxx\appdata\local\programs\python\python36-32\lib\site-packages\pip (python 3.6)
C:\tmp>pip install tensorflow==
Collecting tensorflow==
Could not find a version that satisfies the requirement tensorflow== (from versions: )
No matching distribution found for tensorflow==
Some additional information:
C:\tmp>pip install -vvv tensorflow. -
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\xxx\AppData\Local\Temp\pip-ephem-wheel-cache-fmlkvkla
Created temporary directory: C:\Users\xxx\AppData\Local\Temp\pip-req-tracker-oijk67__
Created requirements tracker 'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-req-tracker-oijk67__'
Created temporary directory: C:\Users\xxx\AppData\Local\Temp\pip-install-tt2d7lx0
Cleaning up...
Removed build tracker 'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-req-tracker-oijk67__'
Invalid requirement: 'tensorflow.'
Followed by a lengthy traceback.
And:
C:\tmp>python -c "from setuptools import pep425tags; print(pep425tags.get_supported()[0])"
c:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
c:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
('cp36', 'cp36m', 'win32')
Judging by the output of
python -c "from setuptools import pep425tags; print(pep425tags.get_supported()[0])"
('cp36', 'cp36m', 'win32')
you have the supported Python version, but a 32 bit distribution installed (the platform tag is win32; for 64 bit Python on Windows, it should be win_amd64). Tensorflow is available for 64 bit distributions only (all the wheels on PyPI have platform tag either macosx_10_11_x86_64 for MacOS, or manylinux1_x86_64 for Linux, or win_amd64 for Windows). Installing the 64 bit Python (e.g. from python-3.6.8-amd64.exe) will do the trick.
You could try to list the available versions:
$ pip.exe install tensorflow==
Collecting tensorflow==
Could not find a version that satisfies the requirement tensorflow== (from ver sions: 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7. 0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9 .0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0)
No matching distribution found for tensorflow==
Pip will not let me install django 2.0.7. When I execute sudo -H pip install Django==2.0.7 it says:
Could not find a version that satisfies the requirement Django==2.0.7 (from versions: 1.1.3, 1.1.4, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 1.4.14, 1.4.15, 1.4.16, 1.4.17, 1.4.18, 1.4.19, 1.4.20, 1.4.21, 1.4.22, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11, 1.5.12, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.6.10, 1.6.11, 1.7, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.7.10, 1.7.11, 1.8a1, 1.8b1, 1.8b2, 1.8rc1, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, 1.8.12, 1.8.13, 1.8.14, 1.8.15, 1.8.16, 1.8.17, 1.8.18, 1.8.19, 1.9a1, 1.9b1, 1.9rc1, 1.9rc2, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9, 1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.10a1, 1.10b1, 1.10rc1, 1.10, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5, 1.10.6, 1.10.7, 1.10.8, 1.11a1, 1.11b1, 1.11rc1, 1.11, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.11.5, 1.11.6, 1.11.7, 1.11.8, 1.11.9, 1.11.10, 1.11.11, 1.11.12, 1.11.13, 1.11.14)
No matching distribution found for Django==2.0.7
As you can see above, the most recent version it can find is version 1.11.14. Normally, I would be okay with downloading that but it is not compatible with Python 3.7 (the version I have). I have also checked to make sure pip was updated to the latest version (pip 10.0.1).
Mac and Linux (and similar systems) both contain default installations (generally Python 2.7). This is accessed via python in terminal.
pip if installed will also be for Python 2.7 (or whatever it is on your system).
When you run sudo -H pip install Django==2.0.7 it points to the 2.7 installation (or your equivalent).
You can test this via the which pip command, which will show in the path where it is installing to.
As mentioned in the other answer, Django lost support for 2.7 with version 1.11.14 so you cannot install the version 2 Django since it has no support (this is your error) for Python 2.
Now to deal with the problem:
To install Django you just need to tell the terminal which interpreter to use. As mentioned you could use pip37 or I prefer to use:
python37 -m pip install Django
Simply because I use python37 command all the time so I know it will work, and will therefore install to the correct location.
Note that since you are installing Django you should probably be using a separate environment for security (venv or virtualenv).
The sudo should not be used only as an absolute last resort (as already mentioned by abccd) as it can ruin your system (I have done this multiple times in a Virtual Installation, so it is definitly something you want to avoid if possible), once again using a virtual environment would ensure that you do not need the sudo command since you are not installing in a root dictionary.
As Simon has mentioned in the comments: your sudo -H pip is installing for Python 2.7, which explains why the latest version for Django is 1.11.14 since Django 2.x dropped support for Python 2.7.
You'll need to use Python 3.7's pip, run either one of the following:
pip3 install --user django
python37 install --user django
python3 install --user django
pip37 install --user django
You REALLY shouldn't use pip with sudo (it's not safe).
Adding to above answers, if you are using a virtual environment, make sure you are using Python3 to create it. You can explicitly do that like this :
virtualenv -p C:\Python36\python3.exe VE_Project
Activate the env . Now if you do a "pip install Django" , it will install the latest in 2.x series.
Last month they released tensor-flow comparability with windows. Looking at the docs I've installed python 3.6 and run
pip install tensorflow-gpu
but it doesn't find it and therefore doesn't install it.
could not find a version that satisfies the requirements tensorflow-gpu(from versions)
Am I missing something basic? How can I fix or circumvent this?
A stable release of Python 3.6 for Windows became available on 12/23/2016, and we have not yet built TensorFlow packages for that version. (We will look into doing this after the holidays.) For now, your best options are:
Downgrade to Python 3.5 (64-bit version), which the pre-built packages support.
Try building TensorFlow from source.
Here is what i did to get tensorflow working with windows.
Download python 3.5.0 (64 bit from Python Releases for Windows)
Install it and check python version by running below command in cmd:
python --version
Python 3.5.0
Then run below command to upgrade pip to latest
python -m pip install --upgrade pip
Now install tensorflow using pip
pip install tensorflow
That's it you have installed tensorflow on windows. Below image shows what happens when you type above commands
Example to verify tensorflow is working.
$ python
...
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
I think you have to install Python 3.5 not 3.6. I'm having the same problem.
pip3 install tensorflow==tensorflow_version
Available tensorflow versions: (0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)