I am trying hard to install PyQt5 in my Jetson nano. However, there is one thing always annoys me.
here's the feedback message.
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sip
Failed to build sip
ERROR: Could not build wheels for sip, which is required to install pyproject.toml-based projects
[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.
I've tried sudo pip3 install pyqt5 and it gave me
compilation terminated.
error: command '/usr/bin/aarch64-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: Failed building wheel for sip
Failed to build sip
ERROR: Could not build wheels for sip, which is required to install pyproject.toml-based projects
[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.
I also tried sudo apt-get install python3-pyqt5. It worked but when I imported PyQt5 by from pyqtgraph.Qt import QtCore, QtGui or from PyQt5.QtCore import QObject, pyqtSignal, it gave me
Traceback (most recent call last):
File "/home/llw/Desktop/project/ture file/save_pointcloud.py", line 16, in <module>
from pyqtgraph.Qt import QtCore, QtGui
File "/usr/local/lib/python3.7/dist-packages/pyqtgraph/__init__.py", line 17, in <module>
from .colors import palette
File "/usr/local/lib/python3.7/dist-packages/pyqtgraph/colors/palette.py", line 1, in <module>
from ..Qt import QtGui
File "/usr/local/lib/python3.7/dist-packages/pyqtgraph/Qt/__init__.py", line 155, in <module>
import PyQt5.QtCore
ModuleNotFoundError: No module named 'PyQt5.QtCore
How do I fix this problem? Any suggestions or ideas could be a help.
Thank you.
Related
I have build a flask app for image segmentation using pretrained model from Detectron2,locally I can run the app without any issue/errors, I am trying to deploy same app on Azure App Service, the problems seems to be installing Detectron2 framework, detectron2 require torch python package to get installed correctly, is there any workaround to install both torch and detectron using requirement.txt
this is the content of requiremnet.txt
firebase==3.0.1
firebase-admin==5.0.3
Flask==2.0.2
imutils==0.5.4
matplotlib==3.3.4
numpy==1.21.6
opencv-python==4.5.3.56
pandas==1.1.5
Pillow==8.4.0
scikit-image==0.17.2
scikit-learn==0.21.3
webcolors==1.11.1
Werkzeug==2.0.2
gspread==5.4.0
oauth2client==4.1.3
opencv-contrib-python==4.5.3.56
tensorflow
torch
# Detectron detectron2
git+https://github.com/facebookresearch/detectron2.git
and here is the error I am getting from Azure Logs
python: 3.7.15
Warning: An outdated version of python was detected (3.7.15). Consider updating.\nVersions supported by Oryx: https://github.com/microsoft/Oryx
Python Version: /tmp/oryx/platforms/python/3.7.15/bin/python3.7
Creating directory for command manifest file if it does not exist
Removing existing manifest file
Python Virtual Environment: antenv
Creating virtual environment...
Activating virtual environment...
Running pip install...
[05:40:09+0000] Collecting git+https://github.com/facebookresearch/detectron2.git (from -r requirements.txt (line 20))
[05:40:09+0000] Cloning https://github.com/facebookresearch/detectron2.git to /tmp/pip-req-build-3_w8g61y
Running command git clone --quiet https://github.com/facebookresearch/detectron2.git /tmp/pip-req-build-3_w8g61y
[05:40:12+0000] Resolved https://github.com/facebookresearch/detectron2.git to commit 1523b3e9929a06d798871eb9afc4c9f770743baf
[05:40:12+0000] Preparing metadata (setup.py): started
[05:40:12+0000] Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-3_w8g61y/setup.py", line 10, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
[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.
I have already tried using different python version, please suggest some workaround or any corrections I need to do.
here I have work around where you manually install some package and then use the requirements.txt file. The reason for this is the module not found error.
Before we begin we should first install the gcc , g++ and git this is done using the following command
apt-get install <Package name>
Now we can install the python packages (I have created venv before we start installing) Independently we can install two i.e. torch & pycocotools
Now we can run the requirements.txt with all the remaining packages.
My requirments.txt:
firebase==3.0.1
firebase-admin==5.0.3
Flask==2.0.2
imutils==0.5.4
matplotlib==3.3.4
numpy==1.21.6
pandas==1.5.3
Pillow==9.4.0
scikit-image==0.19.3
scikit-learn==1.2.1
webcolors== 1.12
Werkzeug==2.2.3
gspread==5.7.2
oauth2client==4.1.3
opencv-contrib-python==4.7.0.68
tensorflow
opencv-python==4.7.0.68
# Detectron detectron2
git+https://github.com/facebookresearch/detectron2.git
Output should like this alfter install all the packages:
pip install pytorch
Collecting pytorch
Using cached pytorch-1.0.2.tar.gz (689 bytes)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pytorch
Building wheel for pytorch (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\isamu\AppData\Local\Temp\pip-install-ib00i94p\pytorch_f353fda7bc1a41bdabf99f644cf66bcb\setup.py", line 15, in
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pytorch
Running setup.py clean for pytorch
Failed to build pytorch
Installing collected packages: pytorch
Running setup.py install for pytorch ... error
error: subprocess-exited-with-error
× Running setup.py install for pytorch did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\isamu\AppData\Local\Temp\pip-install-ib00i94p\pytorch_f353fda7bc1a41bdabf99f644cf66bcb\setup.py", line 11, in
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
[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.
╰─> pytorch
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
tried:
pip install torch
pip3 install efficiencynet_pytorch
pip install pytorch
but didn't help
i was tyring to upload my package on pypi. i already done all the previous steps. and i got a tar file when i was trying to install using zip file i got this error. while i already installed requests using pip3 install requests
import requests
ModuleNotFoundError: No module named 'requests'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
PS C:\Users
i was tyring to upload my package on pypi. i already done all the previous steps. and i got a tar file when i was trying to install using zip file i got this error. while i already installed requests using pip3 install requests.
I want to download librosa in raspberry3 (python3.7.3)
when I tried to install llvmlite, this error happens.
please help me. thank u.
pi#raspberrypi:~ $ sudo pip3 install llvmlite
Building wheel for llvmlite (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
running bdist_wheel
/usr/bin/python3 /tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py
LLVM version... 7.0.1
Traceback (most recent call last):
File "/tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py", line 172, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 11.x.x, got '7.0.1'. Be sure to set LLVM_CONFIG to the right executable path.
Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
error: command '/usr/bin/python3' failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
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
╰─> [18 lines of output]
running install
running build
got version from file /tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/llvmlite/_version.py {'version': '0.38.1', 'full': '650c36d5a79e3825d26fb44f4abd853729a9b959'}
running build_ext
/usr/bin/python3 /tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py
LLVM version... 7.0.1
Traceback (most recent call last):
File "/tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-install-0wqpwf39/llvmlite_1031f7d563fb4394ac842e0554709d18/ffi/build.py", line 172, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 11.x.x, got '7.0.1'. Be sure to set LLVM_CONFIG to the right executable path.
Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
error: command '/usr/bin/python3' failed with exit status 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
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