Failed to install pydriller from sources
Minimal reproducible example
Dockerfile:
FROM debian:12
ENV DEBIAN_FRONTEND="noninteractive" \
POETRY_VERSION="1.8.3" \
POETRY_HOME="/opt/poetry"
RUN apt-get update -y && \
apt-get install -y \
gcc \
curl \
python3-venv \
python3-pip \
python3-dev
ENV PATH=/root/.cargo/bin:/opt/poetry/bin:$PATH
RUN curl -sSL https://install.python-poetry.org | python3 - \
&& poetry config virtualenvs.create false
COPY pyproject.toml .
RUN python3 -m venv /venv && . /venv/bin/activate && \
poetry lock
COPY poetry.toml .
Minimal reproducible example. PyDriller 1.5
poetry.toml:
[installer]
no-binary = [
"gitdb",
"gitpython",
"lizard",
"pydriller",
"pytz",
"smmap",
]
pyproject.toml:
[tool.poetry]
name = "hello-pydriller"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
pydriller="1.15.5"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Minimal reproducible example. PyDriller 1.15.5. Poetry
$ docker build .
$ docker run --rm -it ...
$ source venv/bin/activate
$ poetry install --no-root
Installing dependencies from lock file
Package operations: 6 installs, 0 updates, 0 removals
- Installing smmap (5.0.1)
- Installing gitdb (4.0.11)
- Installing gitpython (3.1.43)
- Installing lizard (1.17.10)
- Installing pytz (2024.1)
- Installing pydriller (1.15.5): Failed
RuntimeError
Unable to find installation candidates for pydriller (1.15.5)
at /opt/poetry/venv/lib/python3.11/site-packages/poetry/installation/chooser.py:74 in choose_for
70│
71│ links.append(link)
72│
73│ if not links:
→ 74│ raise RuntimeError(f"Unable to find installation candidates for {package}")
75│
76│ # Get the best link
77│ chosen = max(links, key=lambda link: self._sort_key(package, link))
78│
Cannot install pydriller.
Minimal reproducible example. PyDriller 1.15.2. Poetry
$ docker build .
$ docker run --rm -it ...
$ source venv/bin/activate
$ poetry install --no-root
Installing dependencies from lock file
Package operations: 6 installs, 0 updates, 0 removals
- Installing smmap (5.0.1)
- Installing gitdb (4.0.11)
- Installing gitpython (3.1.43)
- Installing lizard (1.17.10)
- Installing pytz (2024.1)
- Installing pydriller (1.15.2): Failed
ChefBuildError
Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Traceback (most recent call last):
File "/opt/poetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
main()
File "/opt/poetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/poetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 134, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmpalc04bft/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmpalc04bft/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/tmpalc04bft/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/tmpalc04bft/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 4, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
at /opt/poetry/venv/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare
160│
161│ error = ChefBuildError("\n\n".join(message_parts))
162│
163│ if error is not None:
→ 164│ raise error from None
165│
166│ return path
167│
168│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with pydriller (1.15.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pydriller (==1.15.2)"'.
Minimal reproducible example. PyDriller 1.15. pip
$ docker build .
$ docker run --rm -it ...
$ source venv/bin/activate
$ pip3 install --no-binary ":all:" pydriller=="1.15.5"
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
ERROR: Could not find a version that satisfies the requirement pydriller==1.15.5 (from versions: 1.0, 1.1, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.7, 1.8, 1.9, 1.9.1, 1.9.2, 1.10, 1.10.1, 1.11, 1.11.1, 1.11.2, 1.12, 1.13, 1.14, 1.15, 1.15.1, 1.15.2)
ERROR: No matching distribution found for pydriller==1.15.5
$ pip3 install --no-binary ":all:" pydriller=="1.15.2"
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
Collecting pydriller==1.15.2
Downloading PyDriller-1.15.2.tar.gz (39 kB)
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]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-_8lymkz3/pydriller_beb673ec222a49418a948c1ef98ee9fa/setup.py", line 4, in <module>
with open('requirements.txt') as reqs_file:
^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
[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.
Minimal reproducible example. PyDriller 2.6
pyproject.toml:
[tool.poetry]
name = "hello-pydriller"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
pydriller="2.6"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
poetry.toml:
[installer]
no-binary = [
"gitdb",
"gitpython",
"lizard",
"pydriller",
"pytz",
"smmap",
"types-pytz"
]
Minimal reproducible example. PyDriller 2.6. poetry
$ docker build .
$ docker run --rm -it ...
$ source venv/bin/activate
$ poetry install --no-root
Installing dependencies from lock file
Package operations: 7 installs, 0 updates, 0 removals
- Installing smmap (5.0.1)
- Installing gitdb (4.0.11)
- Installing gitpython (3.1.43)
- Installing lizard (1.17.10)
- Installing pytz (2024.1)
- Installing types-pytz (2024.1.0.20240417)
- Installing pydriller (2.6): Failed
RuntimeError
Unable to find installation candidates for pydriller (2.6)
at /opt/poetry/venv/lib/python3.11/site-packages/poetry/installation/chooser.py:74 in choose_for
70│
71│ links.append(link)
72│
73│ if not links:
→ 74│ raise RuntimeError(f"Unable to find installation candidates for {package}")
75│
76│ # Get the best link
77│ chosen = max(links, key=lambda link: self._sort_key(package, link))
78│
Cannot install pydriller.
Minimal reproducible example. PyDriller 2.6. pip
$ docker build .
$ docker run --rm -it ...
$ source venv/bin/activate
$ pip3 install --no-binary ":all:" pydriller=="2.6"
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
ERROR: Could not find a version that satisfies the requirement pydriller==2.6 (from versions: 1.0, 1.1, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.7, 1.8, 1.9, 1.9.1, 1.9.2, 1.10, 1.10.1, 1.11, 1.11.1, 1.11.2, 1.12, 1.13, 1.14, 1.15, 1.15.1, 1.15.2)
ERROR: No matching distribution found for pydriller==2.6
I'm not super familiar with Poetry, I always wanted to try it but never had the chance, maybe now it's a good time! 😄
If I look at pip, I can install it from source:
❯ pip install -e /Users/dspadini/Documents/pydriller
Obtaining file:///Users/dspadini/Documents/pydriller
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Collecting gitpython (from PyDriller==2.6)
Using cached GitPython-3.1.43-py3-none-any.whl.metadata (13 kB)
Collecting pytz (from PyDriller==2.6)
Using cached pytz-2024.1-py2.py3-none-any.whl.metadata (22 kB)
Collecting types-pytz (from PyDriller==2.6)
Using cached types_pytz-2024.1.0.20240417-py3-none-any.whl.metadata (1.5 kB)
Collecting lizard (from PyDriller==2.6)
Using cached lizard-1.17.10-py2.py3-none-any.whl.metadata (15 kB)
Collecting gitdb<5,>=4.0.1 (from gitpython->PyDriller==2.6)
Using cached gitdb-4.0.11-py3-none-any.whl.metadata (1.2 kB)
Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython->PyDriller==2.6)
Using cached smmap-5.0.1-py3-none-any.whl.metadata (4.3 kB)
Using cached GitPython-3.1.43-py3-none-any.whl (207 kB)
Using cached lizard-1.17.10-py2.py3-none-any.whl (66 kB)
Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
Using cached types_pytz-2024.1.0.20240417-py3-none-any.whl (5.2 kB)
Using cached gitdb-4.0.11-py3-none-any.whl (62 kB)
Using cached smmap-5.0.1-py3-none-any.whl (24 kB)
Building wheels for collected packages: PyDriller
Building editable for PyDriller (pyproject.toml) ... done
Created wheel for PyDriller: filename=PyDriller-2.6-0.editable-py3-none-any.whl size=6884 sha256=ede912dd26eb3b2831acd929fff4e900b0f586ac970f36c5b83cb85ebaaa394d
Stored in directory: /private/var/folders/39/qht51vsx1z12ydvwdp47m50m0000gn/T/pip-ephem-wheel-cache-7dk2zx8h/wheels/3d/70/5d/99d4abf3b226f4e173d29a76d219bc05e95c264811abcadd82
Successfully built PyDriller
Installing collected packages: pytz, lizard, types-pytz, smmap, gitdb, gitpython, PyDriller
Successfully installed PyDriller-2.6 gitdb-4.0.11 gitpython-3.1.43 lizard-1.17.10 pytz-2024.1 smmap-5.0.1 types-pytz-2024.1.0.20240417
[notice] A new release of pip is available: 24.0 -> 24.1.1
[notice] To update, run: pip install --upgrade pip
I'm not super familiar with Poetry
It also failed with pip
I can install it from source:
pip install -e /Users/dspadini/Documents/pydriller - May be publish to PyPi process is broken
Can you try locally (not in Docker) to install it? What errors do you get?
Can you try locally (not in Docker) to install it? What errors do you get?
Same errors on MacOS (arm-based)