Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on pip3 install -r requirements.txt #30

Closed
Fr3d-P opened this issue Nov 2, 2022 · 7 comments
Closed

Error on pip3 install -r requirements.txt #30

Fr3d-P opened this issue Nov 2, 2022 · 7 comments
Assignees
Labels

Comments

@Fr3d-P
Copy link

Fr3d-P commented Nov 2, 2022

Hello

I'm on linux (Ubuntu 22.04.1 LTS)

The command
pip3 install -r requirements.txt
gives an error

in

Collecting opencv-python==4.5.1.48
Using cached opencv-python-4.5.1.48.tar.gz (88.3 MB)
Installing build dependencies ... -

After a long time

Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [865 lines of output]
Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.6" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64"' don't match your environment

@Fr3d-P
Copy link
Author

Fr3d-P commented Nov 3, 2022

I did try with another machine (MacOS Big Sur)
and had the exact same problem in installation

@kkoomen kkoomen pinned this issue Nov 5, 2022
@kkoomen kkoomen self-assigned this Nov 5, 2022
@kkoomen kkoomen added the bug label Nov 5, 2022
@kkoomen
Copy link
Owner

kkoomen commented Nov 5, 2022

Hi, thanks for creating this bug report. I'll work on it immediately.

@kkoomen kkoomen closed this as completed in aab1f37 Nov 5, 2022
@kkoomen
Copy link
Owner

kkoomen commented Nov 5, 2022

Hi. I just released a new version which uses pillow to draw the text and have completely removed the opencv-contrib-python dependency. Reinstall the dependencies with pip3 install -r requirements.txt and then run ./src/qbr.py should be working without the error that freetype doesn't exists.

@surajmaity
Copy link

Hi, the pip3 install -r requirements.txt still gives an error, tried running it on macOS 14.1.2

ERROR: Exception:
Traceback (most recent call last):
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 377, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.py", line 156, in bool
return bool(self._sequence)
^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in bool
return any(self)
^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 211, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 293, in init
super().init(
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in init
self.dist = self._prepare()
^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 525, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 640, in _prepare_linked_requirement
dist = _get_prepared_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py", line 54, in prepare_distribution_metadata
self._install_build_reqs(finder)
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py", line 124, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py", line 101, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_internal/utils/misc.py", line 751, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 166, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 321, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
File "/Users/surajmaity/qbr/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1304, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1325, in _find_and_load_unlocked
File "", line 929, in _load_unlocked
File "", line 994, in exec_module
File "", line 488, in _call_with_frames_removed
File "/private/var/folders/w0/7gkm55x10zq0ds2v0dbwzxfh0000gn/T/pip-build-env-w1kr2bur/overlay/lib/python3.12/site-packages/setuptools/init.py", line 10, in
import distutils.core
ModuleNotFoundError: No module named 'distutils'

@kkoomen
Copy link
Owner

kkoomen commented Dec 5, 2023

@surajmaity Try running pip3 install distutils as your error suggests.

@surajmaity
Copy link

@surajmaity Try running pip3 install distutils as your error suggests.

hey tried running "pip3 install distutils " but still getting this error

ERROR: Could not find a version that satisfies the requirement distutils (from versions: none)
ERROR: No matching distribution found for distutils

Because of that did some finding and bumped into this "distutils is deprecated with removal planned for Python 3.12."

is there any other way to install distutils

@kkoomen
Copy link
Owner

kkoomen commented Dec 6, 2023

Try if there's another build online for your system. This is a problem on your local environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants