As mentioned on the title, CMake seems to be broken after upgrading to MacOS 13.0.
Trying to install something that requires Cmakes takes unusually long then the following pop-up shows up.
“CMake” is damaged and can’t be opened. You should move it to the Trash.
This file was downloaded on an unknown date. # this txt is grey and smaller font
Pop-up Options
1. Move to Trash 2. Cancel
Steps to reproduce Err
Cloned EasyOCR
1.1 git clone ...
Made Python venv
2.0. cd EasyOCR/
2.1. python3 -m venv venv
2.2. source venv/bin/activate
2.3. venv info
python --version && pip --version
# output
Python 3.10.6
pip 22.3 from ... # path to venv dir
pip install -r requirements.txt
# requirements.txt content
torch
torchvision>=0.5
opencv-python-headless<=4.5.4.60
scipy
numpy
Pillow
scikit-image
python-bidi
PyYAML
Shapely
pyclipper
ninja
After a while, the aforementioned pop-up, shows up. Clicking on either option will result in the following error.
Building wheels for collected packages: opencv-python-headless
Building wheel for opencv-python-headless (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for opencv-python-headless (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
File "/private/var/folders/5h/36chnb_s3b5fpqmqgt_7cz_m0000gn/T/pip-build-env-ea_5u80v/overlay/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 613, in setup
cmkr = cmaker.CMaker(cmake_executable)
File "/private/var/folders/5h/36chnb_s3b5fpqmqgt_7cz_m0000gn/T/pip-build-env-ea_5u80v/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 141, in __init__
self.cmake_version = get_cmake_version(self.cmake_executable)
File "/private/var/folders/5h/36chnb_s3b5fpqmqgt_7cz_m0000gn/T/pip-build-env-ea_5u80v/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 95, in get_cmake_version
raise SKBuildError(
Traceback (most recent call last):
Problem with the CMake installation, aborting build. CMake executable is cmake
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opencv-python-headless
Failed to build opencv-python-headless
ERROR: Could not build wheels for opencv-python-headless, which is required to install pyproject.toml-based projects
Any thoughts on how to fix or get around this? This is the first time I see this pop up.
The pip package is broken on macOS 13 prior to CMake 3.24.2 due to improper code signing. You should upgrade CMake in your virtual environment by running:
$ python -m pip install -U pip setuptools wheel
$ python -m pip install -U 'cmake>=3.24.2'
As CMake is extremely backwards compatible, it should be safe. You can also add cmake>=3.24.2 to your requirements.txt.
Related
I'm trying to install stable diffusion. hitting this error after torch is finished installing.
made sure to add python to PATH
deleted venv folder.
reinstalled python 10.6 a few times
not sure how to proceed.
Sorry for the poor formatting of the code
'''
Installing gfpgan
Traceback (most recent call last):
File "C:\Users\B\Downloads\ai\stable-diffusion-webui\launch.py", line 294, in <module>
prepare_environment()
File "C:\Users\B\Downloads\ai\stable-diffusion-webui\launch.py", line 212, in
prepare_environment
run_pip(f"install {gfpgan_package}", "gfpgan")
File "C:\Users\B\Downloads\ai\stable-diffusion-webui\launch.py", line 78, in run_pip
return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing
{desc}", errdesc=f"Couldn't install {desc}")
File "C:\Users\B\Downloads\ai\stable-diffusion-webui\launch.py", line 49, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "C:\Users\B\Downloads\ai\stable-diffusion-webui\venv\Scripts\python.exe" -m pip
install git+https://github.com/TencentARC/GFPGAN.git#8d2447a2d918f8eba5a4a01463fd48e45126a379
--prefer-binary
Error code: 1
stdout: Collecting
git+https://github.com/TencentARC/GFPGAN.git#8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://github.com/TencentARC/GFPGAN.git (to revision
8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\b\appdata\local\temp\pip-req-build-
rnu9_mu9
stderr: Running command git clone --filter=blob:none --quiet
https://github.com/TencentARC/GFPGAN.git 'C:\Users\B\AppData\Local\Temp\pip-req-build-
rnu9_mu9'
fatal: expected 'packfile'
error: subprocess-exited-with-error
git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git
'C:\Users\B\AppData\Local\Temp\pip-req-build-rnu9_mu9' did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git
'C:\Users\B\AppData\Local\Temp\pip-req-build-rnu9_mu9' did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip available: 22.2.1 -> 22.3.1
[notice] To update, run: C:\Users\B\Downloads\ai\stable-diffusion-
webui\venv\Scripts\python.exe -m pip install --upgrade pip
'''
it have some issues with #git urls. Just open the cmd in venv/Lib/site-packages then pip install package_name -t .
btw if more errors occurs, try updating your python to 10.9
I couldn't install it in any way, I wonder what could be the cause of the error.
I installed C++ and other necessary stuff
I am using windows 11
I installed pip install nvidia-pyindex with no problem.
Same as tensorrt I can't install pycuda library and I get same error
\`
(base) PS C:\\Users\\byara\> pip install nvidia-tensorrt
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting nvidia-tensorrt
Downloading nvidia-tensorrt-0.0.1.dev5.tar.gz (7.9 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─\> \[17 lines of output\]
Traceback (most recent call last):
File "\<string\>", line 2, in \<module\>
File "\<pip-setuptools-caller\>", line 34, in \<module\>
File "C:\\Users\\byara\\AppData\\Local\\Temp\\pip-install-ak3sxwfw\\nvidia-tensorrt_a7512906bd3241728853c0e6a10bf9d4\\setup.py", line 150, in \<module\>
raise RuntimeError(open("ERROR.txt", "r").read())
RuntimeError:
\###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
This package is hosted on NVIDIA Python Package Index.
This package can be installed as:
`
$ pip install nvidia-pyindex
$ pip install nvidia-tensorrt
`your text`
###########################################################################################
[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.
\`
TensorRT is not available for Windows via pip. You can verify that by looking at the wheel files in PyPI, link. All the wheel files for the latest version are for Linux. Thus, trying to install on Windows will pick the previous releases, which were place-holder packages. Those releases just print the message you are seeing, on all OSes.
According to the documentation
The zip file is the only option currently for Windows.
You can find instructions on how to install at Zip File Installation.
When I try to install the python typedb-client using pip, I get several errors concerning grpcio:
Building wheels for collected packages: grpcio
Building wheel for grpcio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [21870 lines of output]
ASM Builds for BoringSSL currently not supported on: macosx-11.1-arm64
as well as many lines of:
...
distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
...
This happens both on global installation and in conda environments...
After searching for grpcio installation issues on the M1 architecture, the solution for me was to prepend the following to the pip command:
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip install typedb-client==2.9.0
in some cases, should you see ssl errors, you can extend that command to:
CFLAGS="-I /opt/homebrew/opt/openssl/include" LDFLAGS="-L /opt/homebrew/opt/openssl/lib" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip install typedb-client==2.9.0
assuming that you have openssl install via homebrew. This tells pip where to look for appropriate headers and code to build the grpcio pip package.
So i trying to install onnx using pip install.
OS: Windows 10 LTSC Build 17763
(i installed all packages from requirements.txt using pip install -r | onnx entry in req.txt "# onnx>=1.9.0 # ONNX export" but onnx won't install)
I try to install it using:
pip install onnx
pip3 install
pip install onnx>=1.9.0
pip3 install onnx>=1.9.0
on python versions
3.7.0
3.10.4
3.9.something
i try to download onnx : pip download onnx
and every time i get this:
Collecting onnx
Using cached onnx-1.11.0.tar.gz (9.9 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Red007Master\AppData\Local\Temp\pip-download-coisn9j3\onnx_f49974f8ac4344abaca0eecae41c15e4\setup.py", line 86, in <module>
assert CMAKE, 'Could not find "cmake" executable!'
AssertionError: Could not find "cmake" executable!
[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.
what is "cmake" where i can get it and how i can fix it? + why i need that "cmake" only for this package?
AND what alternative was on downloading/installing packages i have? + what i'm doing wrong.
Download (and install + add to PATH) CMake from cmake.org/download/ and use fresh venv on python version 3.9.2.
just install cmake:
sudo apt install cmake
Trying to install build dependencies with pip which is installing in /usr/local/lib/python2.7/dist-packages
As I try to install proceed gives an error
Collecting git+https://github.com/kti/python-netfilterqueue (from -r requirements.txt (line 1))
Cloning https://github.com/kti/python-netfilterqueue to /tmp/pip-req-build-VQbxfT
Running command git clone -q https://github.com/kti/python-netfilterqueue /tmp/pip-req-build-VQbxfT
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 /usr/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpNlNAvr
cwd: /tmp/pip-req-build-VQbxfT
Complete output (4 lines):
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 16, in <module>
from importlib import import_module
ImportError: No module named importlib
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python2 /usr/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpNlNAvr Check the logs for full command output.
so I try to install importlib with pip and I still get the same error. Then I install it directly to /usr/lib/python2.7/dist-packages/pip/_vendor/pep517/ using
pip install importlib --target=/usr/lib/python2.7/dist-packages/pip/_vendor/pep517/
because pip has been installing all packages to /usr/local/lib/python2.7/dist-packages,
but I still get the error either way
Assuming you are trying to install python-netfilterqueue.
You can visit github page and see this
The current version of NetfilterQueue requires Python 3.6 or later.
So you can't install this lib for python 2.7
But you can install 0.9.0 as it also stated that
The last version with support for Python 2.7 was 0.9.0.
pip install NetfilterQueue=0.9.0
Try switching to python3 because this will definitely work.
First you have to install cython.
pip install cython
Then after that you need to make sure you install NetfilterQueue from source.
git clone https://github.com/oremanj/python-netfilterqueue
Navigate to the netfilterqueue directory.
cd python-netfilterqueue
Then run this command.
python3 setup.py install
That's it. It should work properly