ImageAI
ImageAI copied to clipboard
pip install doesnt work
Hi Moses, this is the stacktrace in osx 12.6
┌<▸> ~ └➤ pip install imageai --upgrade zsh: /usr/local/bin/pip: bad interpreter: /usr/local/opt/[email protected]/bin/python3.9: no such file or directory Collecting imageai Downloading imageai-2.1.6-py3-none-any.whl (160 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.9/160.9 kB 2.8 MB/s eta 0:00:00 Collecting pillow==7.0.0 Downloading Pillow-7.0.0.tar.gz (38.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.2/38.2 MB 45.0 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting numpy==1.19.3 Downloading numpy-1.19.3.zip (7.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 52.2 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [46 lines of output]
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AssertionError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/folders/0x/gmzly6vn2f7ggfk47bdcsbnc0000gn/T/pip-install-29h6ei6i/numpy_3856a8b54d7b484490728676ad49d049/tools/cythonize.py", line 235, in <module>
main()
File "/private/var/folders/0x/gmzly6vn2f7ggfk47bdcsbnc0000gn/T/pip-install-29h6ei6i/numpy_3856a8b54d7b484490728676ad49d049/tools/cythonize.py", line 231, in main
find_process_files(root_dir)
File "/private/var/folders/0x/gmzly6vn2f7ggfk47bdcsbnc0000gn/T/pip-install-29h6ei6i/numpy_3856a8b54d7b484490728676ad49d049/tools/cythonize.py", line 222, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "/private/var/folders/0x/gmzly6vn2f7ggfk47bdcsbnc0000gn/T/pip-install-29h6ei6i/numpy_3856a8b54d7b484490728676ad49d049/tools/cythonize.py", line 188, in process
processor_function(fromfile, tofile)
File "/private/var/folders/0x/gmzly6vn2f7ggfk47bdcsbnc0000gn/T/pip-install-29h6ei6i/numpy_3856a8b54d7b484490728676ad49d049/tools/cythonize.py", line 64, in process_pyx
raise OSError('Cython needs to be installed in Python as a module')
OSError: Cython needs to be installed in Python as a module
Cythonizing sources
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/usr/local/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/build_meta.py", line 188, in prepare_metadata_for_build_wheel
self.run_setup()
File "/usr/local/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/build_meta.py", line 281, in run_setup
super(_BuildMetaLegacyBackend,
File "/usr/local/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(code, locals())
File "<string>", line 508, in <module>
File "<string>", line 488, in setup_package
File "<string>", line 285, in generate_cython
RuntimeError: Running cythonize failed!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. ┌<▪> ~ └➤
similarly, it is impossible to install it on suse, ubuntu, manjaro
It only works with the old version of Python, like 3.6.9. I'd suggest you install it in a python virtual environment.
I would like to leave it open to see if one day the framework is updated to python3. Python2 is deprecated and no longer receives security updates, which is more than enough reason for everyone to uninstall it from their computers and code maintainers to update their libraries.
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=python
Isn't python 3.10 suggested in README? Got the same error. Cython is installed.