When python version is 3.8, pip do not show TF 1.13.2.
More specifically, TF version higher than 2.2 can be shown.
It can cause build error because of following codes.
https://github.com/Samsung/ONE/blob/72e95206edecc7587a00fbd213192cfce7ef07e1/compiler/common-artifacts/CMakeLists.txt#L27-L33
Error log by @underflow101
[ 95%] Generating ../../overlay/requirements.txt Requirement already up-to-date:
pip in /home/bear/.local/lib/python3.8/site-packages (20.1.1) Requirement already up-to-date:
setuptools in /home/bear/data/opensource/ONE/build/overlay/venv_1_13_2/lib/python3.8/site-packages (49.2.0)
ERROR: Could not find a version that satisfies the requirement tensorflow==1.13.2
(from -r /home/bear/data/opensource/ONE/build/overlay/requirements.txt (line 1))
(from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2)
ERROR: No matching distribution found for tensorflow==1.13.2
(from -r /home/bear/data/opensource/ONE/build/overlay/requirements.txt (line 1))
make[2]: *** [compiler/common-artifacts/CMakeFiles/common_artifacts_python_deps.dir/build.make:69:
overlay/requirements.txt] Error 1
make[2]: *** Deleting file 'overlay/requirements.txt' make[1]: ***
[CMakeFiles/Makefile2:15929: compiler/common-artifacts/CMakeFiles/common_artifacts_python_deps.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
We may resolve this by downloading and installing specific Tensorflow
This is especially a problem with users using Ubuntu 20.04 LTS, because Ubuntu 20.04 LTS comes with Python 3.8 as default.
I fixed this by manually installing tensorflow-1.13.1 with wheel file from here, and then copied the whole dist directory under ONE/build/overlay/venv_1_13_2/lib/python3.8/site-packages/, and finally change directory name from tensorflow-1.13.1 -> tensorflow-1.13.2.
I know this is kind of work around, so we should add some way to install tensorflow-1.13.2 automatically for python3.8.
Thank you for posting this issue.
So if we downgrade to tensorflow==1.13.1 then it is OK?
As I said in gitter, tensorflow(~2.1.X) works at python 3.5-3.7. So, it would better to downgrade your python.
@seanshpark , @mhs4670go , I think if user's PC doesn't have corresponding python version, making shell script to download a python of version 3.7 to proceed on is a good idea.
How do you think?
@underflow101 Thank you for your suggestion.
As of now, tensorflow 1.13.2 is a prerequisite for Developers. So, it will be added to Developer guide. FYI, since the TensorFlow version required by the user is 3.2 or higher, we don't need the script you said above.
Downgrading python in Ubuntu 20.04 maybe difficult. In this case, users can use Docker with Ubuntu 16.04 or 18.04.
@underflow101, do you have any experience or willing to use Docker?
Just asking this to check recommanding this to contributors is appropriate or not...
@mhs4670go , Thank you for your information! :)
@seanshpark, Yes, I have experience using Docker-ce, but for me, I have solved my issue by myself, so I wouldn't need to use Docker from now on.
But I think, in my opinion, for most of the contributors, it would be better (or easier) to use Docker in this case.
Or maybe pyenv can solve this issue?
Or maybe pyenv can solve this issue?
I'm not good at python but that can be a solution; thank you! And also thank you for your opinion!
For 20.04 (which has python 3.8.5), use Anaconda(https://www.anaconda.com/products/individual).
1) install Anaconda
2) create python3.7 env
3) activate it
4) clone the repo , configure and build.
it worked me and has no side effects.
For 20.04 (which has python 3.8.5), use Anaconda(https://www.anaconda.com/products/individual).
It could be an answer too!
But, personally speaking, Anaconda had some package version issues with me before,
and I stopped using it since then.
Now ONE supports >TF2.3.0, so the problem won't happen again :)
Most helpful comment
It could be an answer too!
But, personally speaking, Anaconda had some package version issues with me before,
and I stopped using it since then.
Now ONE supports >TF2.3.0, so the problem won't happen again :)