Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ultralytics 8.0.232 has requirement numpy>=1.22.2, but you'll have numpy 1.19.5 which is incompatible #11339

Open
anilshootup opened this issue Nov 19, 2024 · 6 comments
Labels
models:official models that come under official repository stat:awaiting response Waiting on input from the contributor type:support

Comments

@anilshootup
Copy link

python {
version '3.8'
pip {
install "matplotlib"
install "pandas"
install "ultralytics==8.0.232"
install "seaborn==0.12.2"
install "numpy"
install "opencv-python"
install "gitpython"
}
}
I am getting this issue when i build the code
ultralytics 8.0.232 has requirement numpy>=1.22.2, but you'll have numpy 1.19.5 which is incompatible.
but when i change install "numpy==1.22.2"

    then it shows  : Failed to install numpy==1.22.2 from https://files.pythonhosted.org/packages/e9/6c/c0a8130fe198f27bab92f1b28631e0cc2572295f6b7a31e87efe7448aa1c/numpy-1.22.2.zip#sha256=076aee5a3763d41da6bef9565fdf3cb987606f567cd8b104aded2b38b7b47abf.
    please help me what i am doing wrong 
@anilshootup anilshootup added models:official models that come under official repository type:bug Bug in the code labels Nov 19, 2024
@bharatjetti
Copy link
Collaborator

Hi @anilshootup
I tried installing ultralytics==8.0.232 within Python 3.8 environment. I followed these steps,
Within Environment,
pip install --upgrade pip
pip install ultralytics==8.0.232
It worked fine.
please try this and let me know if you face any more difficulties.
Here are the screenshots.
Screenshot 2024-11-19 at 12 47 21 PM
Screenshot 2024-11-19 at 12 47 56 PM

@anilshootup
Copy link
Author

anilshootup commented Nov 19, 2024

HI @bharatjetti

actually this is am doing using Android gradle file
Screenshot 2024-11-19 at 1 30 37 PM

I am getting this error
python version this Requirement already satisfied: pip in /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages (24.3.1)

@bharatjetti bharatjetti added stat:awaiting response Waiting on input from the contributor and removed stat:awaiting response Waiting on input from the contributor labels Nov 19, 2024
@bharatjetti
Copy link
Collaborator

Hi @anilshootup

In the error message I can see that you are using python3.13 for consistency
Could you please try using command to force install with python 3.8
python3.8 -m pip install --upgrade pip
python3.8 -m pip install ultralytics==8.0.232
Please let me know any further issue.
Thank you.

@anilshootup
Copy link
Author

anilshootup commented Nov 19, 2024

Error: [email protected] has been disabled because it is deprecated upstream! It was disabled on 2024-10-14.
This error is coming so i think 3.8 is depreciated

so now i have increase version 3.9

now i am getting this error : Failed to install opencv-python from https://files.pythonhosted.org/packages/4a/e7/b70a2d9ab205110d715906fc8ec83fbb00404aeb3a37a0654fdb68eb0c8c/opencv-python-4.10.0.84.tar.gz#sha256=72d234e4582e9658ffea8e9cae5b63d488ad06994ef12d81dc303b17472f3526.

@anilshootup
Copy link
Author

also i am getting this exception

ERROR: Exception:
Traceback (most recent call last):
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
status = self.run(options, args)
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
return func(self, options, args)
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/commands/install.py", line 335, in run
requirement_set = resolver.resolve(
reqs, check_supported_wheels=not options.target_dir
)
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/operations/prepare.py", line 433, in prepare_linked_requirement
abstract_dist = _get_prepared_distribution(
req, self.req_tracker, self.finder, self.build_isolation,
)
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/operations/prepare.py", line 86, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata
self._setup_isolation(finder)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_internal/distributions/sdist.py", line 97, in _setup_isolation
reqs = backend.get_requires_for_build_wheel()
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_vendor/pep517/wrappers.py", line 160, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'config_settings': config_settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
})
^^
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_vendor/pep517/wrappers.py", line 265, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
File "/Users/cdp/AndroidStudioProjects/SdEnergyMeter/app/build/python/env/debug/lib/python3.13/site-packages/pip/_vendor/pep517/_in_process.py", line 86, in _build_backend
obj = import_module(mod_path)
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 1022, in exec_module
File "", line 488, in _call_with_frames_removed
File "/private/var/folders/f1/bdvrvq0j1tsfylmfwl7pbb680000gn/T/pip-build-env-tiflvfzg/overlay/lib/python3.13/site-packages/setuptools/init.py", line 18, in
from setuptools.extern.six import PY3, string_types
ModuleNotFoundError: No module named 'setuptools.extern.six'

Chaquopy: Exit status 2
when i build my code Using below configuration

python {
version '3.9'
pip {
install "matplotlib"
install "pandas"
install "ultralytics==8.0.232"
install "seaborn==0.12.2"
install "numpy==1.21.2"
install "opencv-python"
install "gitpython"
}
}
NOTE : I am using com.chaquo.python library to run python code in android

@laxmareddyp laxmareddyp added type:support and removed type:bug Bug in the code labels Nov 19, 2024
@bharatjetti
Copy link
Collaborator

Hi @anilshootup
Could you please provide the complete steps,
As I can see in the error message the python 3.13 is being used,
by seeing this error message "ModuleNotFoundError: No module named 'setuptools.extern.six'"
Could you include " install "six" " in the configuration and try the build.
Thank you

@bharatjetti bharatjetti added the stat:awaiting response Waiting on input from the contributor label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
models:official models that come under official repository stat:awaiting response Waiting on input from the contributor type:support
Projects
None yet
Development

No branches or pull requests

3 participants