Error Updating GDAL using pip (python3) on Ubuntu 20.04 LTS - python-3.x

I have a Linux Server (Ubuntu 20.04 LTS) and I am trying to update GDAL.
All below has been used to update packages:
/usr/bin/python3 -m pip install --upgrade pip
/usr/bin/python3 -m pip install --upgrade wheel
/usr/bin/python3 -m pip install --upgrade setuptools
Then, to check GDAL version:
gdal2tiles.py --version
GDAL 3.0.4, released 2020/01/28
Traceback (most recent call last):
File "/usr/bin/gdal2tiles.py", line 2915, in <module>
main()
File "/usr/bin/gdal2tiles.py", line 2905, in main
input_file, output_folder, options = process_args(argv[1:])
TypeError: 'NoneType' object is not subscriptable
I am not sure why those errors just when showing the version.
Anyhow, I use the following command to try to update GDAL and I get error about building the wheel:
/usr/bin/python3 -m pip install --upgrade GDAL
Errors:
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> GDAL
extensions/gdal_wrap.cpp:5573:13: warning: ‘CheckNumericDataType’ defined but not used [-Wunused-variable]
5573 | static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
| ^~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> GDAL

Related

python setup.py bdist_wheel did not run successfully on MAC M1

I want to pip install robotframework-puppeteerlibrary on mac m1.But it have some error.
after install I try to solve by pip install --upgrade pip pip install --use-pep517 greenlet the result is the same before. And then I brew install greenlet again. It doesn't working.I don't how to solve this problem.
Expected result : I want to use puppeteer on mac with robotframework.
Requirement already satisfied: zipp>=0.5 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from importlib-metadata>=1.4->pyppeteer==1.0.2->robotframework-puppeteerlibrary) (3.12.1)
Building wheels for collected packages: greenlet
Building wheel for greenlet (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [243 lines of output]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for greenlet
Running setup.py clean for greenlet
Failed to build greenlet
Installing collected packages: pyee, greenlet, playwright, robotframework-puppeteerlibrary
Attempting uninstall: pyee
Found existing installation: pyee 9.0.4
Uninstalling pyee-9.0.4:
Successfully uninstalled pyee-9.0.4
Attempting uninstall: greenlet
Found existing installation: greenlet 2.0.2
Uninstalling greenlet-2.0.2:
Successfully uninstalled greenlet-2.0.2
Running setup.py install for greenlet ... error
error: subprocess-exited-with-error
× Running setup.py install for greenlet did not run successfully.
│ exit code: 1
╰─> [245 lines of output]
running install
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-311
creating build/lib.macosx-10.9-universal2-cpython-311/greenlet
copying src/greenlet/__init__.py -> build/lib.macosx-10.9-universal2-cpython-311/greenlet
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of greenlet
Moving to /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/greenlet/
from /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/~reenlet
Moving to /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/greenlet-2.0.2.dist-info/
from /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/~reenlet-2.0.2.dist-info
Moving to /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/greenlet/
from /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/~reenlet
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> greenlet
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I want to pip install package and use with robotframework.

I'm encountering an error while installing turicreate module on wsl, is there any requirements I'm missing?

whenever I try to install turicreate module on wsl it's showing an error like this
`Collecting turicreate
Using cached turicreate-6.4.tar.gz (1.9 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for turicreate, since package 'wheel' is not installed.
Installing collected packages: turicreate
Running setup.py install for turicreate ... error
error: subprocess-exited-with-error
× Running setup.py install for turicreate did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
running install
/root/turitest/venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
==================================================================================
TURICREATE ERROR
If you see this message, pip install did not find an available binary package
for your system.
Supported Platforms:
* macOS 10.12+ x86_64.
* Linux x86_64 (including WSL on Windows 10).
Support Python Versions:
* 2.7
* 3.5
* 3.6
* 3.7
* 3.8
Another possible cause of this error is an outdated pip version. Try:
`pip install -U pip`
==================================================================================
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> turicreate
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
`
pip version - 22.0.2
python3.10 (I guess this maybe the problem, but I'm not sure)
windows10 OS
can someone help me to install turicreate...
I tried updating and upgrading pip versions, tried in python 2.7 and python3.10 but still got the same error.
I also tried this command,
python3 -m pip3 install -U pip
this returned
No module named pip3

pip install websocket - Error: subprocess-exited-with-error. Cant execute `setup.py` since setuptools is not available in the build environment

pip --version pip 23.0 from C:\Users\sebas\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)
python --version 3.10.4
$ pip install websocket
Collecting websocket
Using cached websocket-0.2.1.tar.gz (195 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[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.
Any idea what's going on here? I have never seen such an error before.

No command works to download sklearn

I am trying to install sklearn. I have tried all the commands of this post: ImportError: No module named sklearn (Python) but none of these works.
I get this:
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --upgrade pip' command.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --upgrade pip' command.
What can I do?

Can't install Darts / llvmlite on Mac Python 3.8.9

Hello im having a real hard time installing darts in Python
Thanks in advance.
Running setup.py install for llvmlite ... error
error: subprocess-exited-with-error
× Running setup.py install for llvmlite did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running install
/opt/homebrew/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
got version from file /private/var/folders/m4/g2pdxhsd7dn2652ll8d9sz3c0000gn/T/pip-install-fza_0yk5/llvmlite_dc59eabdee5b435d8bd514c51e5c47db/llvmlite/_version.py {'version': '0.38.0', 'full': 'f0365b91ce1e1f74c68785c6d0067f32f89857d9'}
running build_ext
/opt/homebrew/opt/python#3.9/bin/python3.9 /private/var/folders/m4/g2pdxhsd7dn2652ll8d9sz3c0000gn/T/pip-install-fza_0yk5/llvmlite_dc59eabdee5b435d8bd514c51e5c47db/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/private/var/folders/m4/g2pdxhsd7dn2652ll8d9sz3c0000gn/T/pip-install-fza_0yk5/llvmlite_dc59eabdee5b435d8bd514c51e5c47db/ffi/build.py", line 220, in
main()
File "/private/var/folders/m4/g2pdxhsd7dn2652ll8d9sz3c0000gn/T/pip-install-fza_0yk5/llvmlite_dc59eabdee5b435d8bd514c51e5c47db/ffi/build.py", line 214, in main
main_posix('osx', '.dylib')
File "/private/var/folders/m4/g2pdxhsd7dn2652ll8d9sz3c0000gn/T/pip-install-fza_0yk5/llvmlite_dc59eabdee5b435d8bd514c51e5c47db/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a llvm-config binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/opt/homebrew/opt/python#3.9/bin/python3.9' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> llvmlite
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Please try to install darts in mac version 12.5.1 as follows:
My python version is different. But hoping this procedure works for you:
For your information below is my requirement.txt:
protobuf==3.20.1
python-dateutil==2.8.2
elasticsearch==7.13.0
elasticsearch-dsl==7.4.0
Flask==1.1.4
flask_restplus==0.13.0
Werkzeug==0.16.1
python-json-logger==2.0.2
ecs-logging==2.0.0
omegaconf==2.1.1
mock==4.0.3
nltk==3.6.7
PyJWT==2.4.0
pytest==6.2.5
requests==2.27.1
scikit-learn==1.0.2
pandas==1.3.5
pandasql==0.7.3
xlrd==2.0.1
colorlog==6.6.0
darts==0.15.0
psutil==5.9.1
decorator==5.1.1
zulu==2.0.0
But for dart installation i was facing issue. I solved the issue by manually installing packages as follows:-
% python --version
Python 3.10.6
% pip install CMAKE
% pip install setuptools
% pip3 install gensim
% brew install lightgbm
% brew install cmake
% brew install libomp
% pip install httpstan
% pip install lightgbm
% pip install ipython
% pip install google-auth-oauthlib
% pip install filterpy
% pip install cmdstanpy
% pip install tensorboard
% pip install prophet
% pip install pmdarima
% pip install darts
% pip list | grep darts
darts 0.21.0

Resources