kubeedge / ianvs

Distributed Synergy AI Benchmarking
https://ianvs.readthedocs.io
Apache License 2.0
115 stars 46 forks source link

following quickstart guide and meet No matching distribution found for tensorflow~=1.14.0 #101

Closed IcyFeather233 closed 6 months ago

IcyFeather233 commented 6 months ago

What happened:

I am following QuickStart Guide to install the env, when I run this as the guide reads:

cd /ianvs/project/ianvs/
python -m pip install examples/resources/algorithms/FPN_TensorFlow-0.1-py3-none-any.whl

it shows:

(ianvs) icyfeather@gpu3:~/project/ianvs$ pip install examples/resources/algorithms/FPN_TensorFlow-0.1-py3-none-any.whl
Processing ./examples/resources/algorithms/FPN_TensorFlow-0.1-py3-none-any.whl
Collecting wheel~=0.36.2 (from FPN-TensorFlow==0.1)
  Using cached wheel-0.36.2-py2.py3-none-any.whl.metadata (2.3 kB)
Collecting libs~=0.0.10 (from FPN-TensorFlow==0.1)
  Using cached libs-0.0.10-py3-none-any.whl.metadata (831 bytes)
INFO: pip is looking at multiple versions of fpn-tensorflow to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement tensorflow~=1.14.0 (from fpn-tensorflow) (from versions: 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0, 2.11.1, 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.0.post1, 2.15.1, 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow~=1.14.0

How to reproduce it (as minimally and precisely as possible):

conda create -n ianvs python=3.9
conda activate ianvs
python -m pip install ./examples/resources/third_party/*
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python setup.py install
python -m pip install examples/resources/algorithms/FPN_TensorFlow-0.1-py3-none-any.whl

Anything else we need to know?:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
python=3.9
hsj576 commented 6 months ago

Try the solution in this link. Besides that, if you just want to run an example of Ianvs, it's more recommended for you to try the lifelong learning example.

IcyFeather233 commented 6 months ago

Thanks so much! It works, and I will try the lifelong learning example.

IcyFeather233 commented 5 months ago

This is actually the python version problem

run wheel unpack examples/resources/algorithms/FPN_TensorFlow-0.1-py3-none-any.whl (about wheel unpack/pack, see details)to unpack the whl file, we can find in METADATA, it reads:

Metadata-Version: 2.1
Name: FPN-TensorFlow
Version: 0.1
Summary: FPN TensorFlow Algorithm
Home-page: https://github.com/kubeedge-sedna/FPN_Tensorflow
Author: FPN_TensorFlow
Author-email: pujie2@huawei.com
Maintainer: FPN_TensorFlow
Maintainer-email: 
License: Apache License 2.0
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: wheel (~=0.36.2)
Requires-Dist: libs (~=0.0.10)
Requires-Dist: tensorflow (~=1.14.0)
Requires-Dist: matplotlib (~=3.3.4)
Requires-Dist: Pillow (~=8.1.1)
Requires-Dist: tqdm (~=4.62.3)
Requires-Dist: dataclasses (~=0.8)
Requires-Dist: zipp (~=3.6.0)

The FPN_TensorFlow-0.1-py3-none-any.whl package needs tensorflow 1.14.0, however, as show in https://pypi.org/project/tensorflow/1.14.0/#files, the tensorflow 1.14.0 only supports python verstion upto 3.7, so downgrade the python version is ok for this problem.

And if you use python3.7, you may meet another problem as below:

ERROR: Ignored the following versions that require a different python version: 0.43.0 Requires-Python >=3.8; 0.7 Requires-Python >=3.6, <3.7; 0.8 Requires-Python >=3.6, <3.7; 10.0.0 Requires-Python >=3.8; 10.0.1 Requires-Python >=3.8; 10.1.0 Requires-Python >=3.8; 10.2.0 Requires-Python >=3.8; 10.3.0 Requires-Python >=3.8; 3.6.0 Requires-Python >=3.8; 3.6.0rc1 Requires-Python >=3.8; 3.6.0rc2 Requires-Python >=3.8; 3.6.1 Requires-Python >=3.8; 3.6.2 Requires-Python >=3.8; 3.6.3 Requires-Python >=3.8; 3.7.0 Requires-Python >=3.8; 3.7.0rc1 Requires-Python >=3.8; 3.7.1 Requires-Python >=3.8; 3.7.2 Requires-Python >=3.8; 3.7.3 Requires-Python >=3.8; 3.7.4 Requires-Python >=3.8; 3.7.5 Requires-Python >=3.8; 3.8.0 Requires-Python >=3.9; 3.8.0rc1 Requires-Python >=3.9; 3.8.1 Requires-Python >=3.9; 3.8.2 Requires-Python >=3.9; 3.8.3 Requires-Python >=3.9; 3.8.4 Requires-Python >=3.9; 3.9.0 Requires-Python >=3.9; 3.9.0rc2 Requires-Python >=3.9
ERROR: Could not find a version that satisfies the requirement dataclasses~=0.8 (from fpn-tensorflow) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
ERROR: No matching distribution found for dataclasses~=0.8

This is because python3.7 doesn't need dataclasses0.8:

image

We can delete Requires-Dist: dataclasses (~=0.8) this line in METADATA and re-pack the whl:

wheel pack --build-number 2 FPN_TensorFlow-0.1

and get a new FPN_TensorFlow-0.1-2-py3-none-any.whl file, for me, it is successfully installed in python 3.7 env.

Conclusion:

You can use python 3.7 to install this algorithm whl package, but you need to change it a little, unpack the whl and delete the dataclasses line, and re-pack it, you can install it successfully.

I think this should be added to the docs, because this is in QuickStart (for me it's not quick at all haha), and now many people use python>3.8, so this info will be useful for a lot.

hsj576 commented 5 months ago

This is actually the python version problem

run wheel unpack examples/resources/algorithms/FPN_TensorFlow-0.1-py3-none-any.whl (about wheel unpack/pack, see details)to unpack the whl file, we can find in METADATA, it reads:

Metadata-Version: 2.1
Name: FPN-TensorFlow
Version: 0.1
Summary: FPN TensorFlow Algorithm
Home-page: https://github.com/kubeedge-sedna/FPN_Tensorflow
Author: FPN_TensorFlow
Author-email: pujie2@huawei.com
Maintainer: FPN_TensorFlow
Maintainer-email: 
License: Apache License 2.0
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: wheel (~=0.36.2)
Requires-Dist: libs (~=0.0.10)
Requires-Dist: tensorflow (~=1.14.0)
Requires-Dist: matplotlib (~=3.3.4)
Requires-Dist: Pillow (~=8.1.1)
Requires-Dist: tqdm (~=4.62.3)
Requires-Dist: dataclasses (~=0.8)
Requires-Dist: zipp (~=3.6.0)

The FPN_TensorFlow-0.1-py3-none-any.whl package needs tensorflow 1.14.0, however, as show in https://pypi.org/project/tensorflow/1.14.0/#files, the tensorflow 1.14.0 only supports python verstion upto 3.7, so downgrade the python version is ok for this problem.

And if you use python3.7, you may meet another problem as below:

ERROR: Ignored the following versions that require a different python version: 0.43.0 Requires-Python >=3.8; 0.7 Requires-Python >=3.6, <3.7; 0.8 Requires-Python >=3.6, <3.7; 10.0.0 Requires-Python >=3.8; 10.0.1 Requires-Python >=3.8; 10.1.0 Requires-Python >=3.8; 10.2.0 Requires-Python >=3.8; 10.3.0 Requires-Python >=3.8; 3.6.0 Requires-Python >=3.8; 3.6.0rc1 Requires-Python >=3.8; 3.6.0rc2 Requires-Python >=3.8; 3.6.1 Requires-Python >=3.8; 3.6.2 Requires-Python >=3.8; 3.6.3 Requires-Python >=3.8; 3.7.0 Requires-Python >=3.8; 3.7.0rc1 Requires-Python >=3.8; 3.7.1 Requires-Python >=3.8; 3.7.2 Requires-Python >=3.8; 3.7.3 Requires-Python >=3.8; 3.7.4 Requires-Python >=3.8; 3.7.5 Requires-Python >=3.8; 3.8.0 Requires-Python >=3.9; 3.8.0rc1 Requires-Python >=3.9; 3.8.1 Requires-Python >=3.9; 3.8.2 Requires-Python >=3.9; 3.8.3 Requires-Python >=3.9; 3.8.4 Requires-Python >=3.9; 3.9.0 Requires-Python >=3.9; 3.9.0rc2 Requires-Python >=3.9
ERROR: Could not find a version that satisfies the requirement dataclasses~=0.8 (from fpn-tensorflow) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
ERROR: No matching distribution found for dataclasses~=0.8

This is because python3.7 doesn't need dataclasses0.8: image

We can delete Requires-Dist: dataclasses (~=0.8) this line in METADATA and re-pack the whl:

wheel pack --build-number 2 FPN_TensorFlow-0.1

and get a new FPN_TensorFlow-0.1-2-py3-none-any.whl file, for me, it is successfully installed in python 3.7 env.

Conclusion:

You can use python 3.7 to install this algorithm whl package, but you need to change it a little, unpack the whl and delete the dataclasses line, and re-pack it, you can install it successfully.

I think this should be added to the docs, because this is in QuickStart (for me it's not quick at all haha), and now many people use python>3.8, so this info will be useful for a lot.

Good job!