error installing gfpgan. python 10.6 installed - python

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

Related

Cmake problems after upgrading to MacOS 13.0

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.

Trying to install onnx using pip and it throwing error: metadata-generation-failed

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

Dockerfile on Raspberry Pi 3B+

I'm trying to create a docker image on Raspberry Pi 3B+, which i couldn't managed for days. Before creating Docker image, i implemented the code with virtualenv beforehand, which is working fine and requirements.txt is simplified as possible.
Dockerfile ->
FROM alpine:3.14
WORKDIR /code
RUN apk update
RUN apk add python3
RUN apk add py3-pip
RUN pip install wheel
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade Pillow
# copy the requirements inside docker image
COPY ./requirements.txt /code/requirements.txt
# install dependencies inside docker image
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# copy the necessary files in the working directory inside docker image
COPY ./ /code
# RUN the code
CMD ["python3", "camera.py"]
requirements.txt ->
numpy==1.22.3
picamera==1.13
Pillow==9.1.0
requests==2.27.1
When i try to build the image by running
sudo docker build -t camera .
I get the following long error
Building wheels for collected packages: Pillow Building wheel for
Pillow (setup.py): started Building wheel for Pillow (setup.py):
finished with status 'error' error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [177 lines of output]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-
7613obru/pillow_a212af14addc481892cfcd3648121cf3/setup.py",
line 1009, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for Pillow
Running setup.py clean for Pillow Failed to build Pillow Installing
collected packages: Pillow Running setup.py install for Pillow:
started Running setup.py install for Pillow: finished with status
'error' error: subprocess-exited-with-error
× Running setup.py install for Pillow did not run successfully. │ exit code: 1 ╰─> [179 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.9
creating build/lib.linux-armv7l-3.9/PIL
copying src/PIL/ImageTk.py -> build/lib.linux-armv7l-3.9/PIL
copying src/PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.9/PIL
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
line 804, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-
7613obru/pillow_a212af14addc481892cfcd3648121cf3/setup.py",
line 1009, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
[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. ╰─> Pillow
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I've deleted some repetitive lines of error since it was extremely long
It seems i have development libraries missing, i added the following lines and the error was solved
RUN apk add build-base python3-dev py-pip jpeg-dev zlib-dev py3-wheel py3-setuptools
ENV LIBRARY_PATH=/lib:/usr/lib

My Kali linux showing 'No module named importlib' 'from importlib import import_module'

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

while installing apex extension for pytorch(python environment) the following error is showing, am unable to solve this problem

I want to install apex extension for my pytorch environment, my system is windows 10 and am using python version 3.8.1 and pip version is 20.0.2
I read the instructions from this https://github.com/NVIDIA/apex and I executed the command
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext
This error is showing.
c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\pip_internal\commands\install.py:244: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options)
Non-user install because site-packages writeable
Created temporary directory: C:\Users\Dell\AppData\Local\Temp\pip-ephem-wheel-cache-ehoqwpvf
Created temporary directory: C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi
Initialized build tracking at C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi
Created build tracker: C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi
Entered build tracker: C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi
Created temporary directory: C:\Users\Dell\AppData\Local\Temp\pip-install-rivnsaa9
Cleaning up...
Removed build tracker: 'C:\Users\Dell\AppData\Local\Temp\pip-req-tracker-uowlsjqi'
ERROR: You must give at least one requirement to install (see "pip help install")
Exception information:
Traceback (most recent call last):
File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
Please solve this problem
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext
The line specified in your link is
$ pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
Note that you're missing the final ./, which is why pip tells you that
You must give at least one requirement to install (see "pip help install")
you're telling it to install, but you're not telling it what to install.

Categories