Bug 1767003
Summary: | pipenv does not work on Fedora 31 with Python 2.7 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Lumír Balhar <lbalhar> |
Component: | pipenv | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 31 | CC: | m.cyprian, mhroncok, python-sig |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | pipenv-2018.11.26-12.fc30 pipenv-2018.11.26-12.fc29 pipenv-2018.11.26-12.fc31 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-09 22:39:04 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Lumír Balhar
2019-10-30 13:15:33 UTC
The bloody tool uses the bundled pathlib2 even when running on Python 3 but creating Python 2 environments. We need to re-bundle it. I've installed python3-pathlib2 and the problem seems gone for me. Cannot longer reproduce form a fresh directory:
$ rpm -q pipenv
pipenv-2018.11.26-8.fc31.noarch
$ rpm -q python3-pathlib2
python3-pathlib2-2.3.4-2.fc31.noarch
$ mkdir new
$ cd new
$ cat > Pipenv << EOF
> [[source]]
> url = "https://pypi.python.org/simple"
> verify_ssl = true
> name = "pypi"
>
> [packages]
> requests = "==2.20.0"
>
> [dev-packages]
> pytest = ">=2.8.0"
>
> [requires]
> python_version = "2.7"
> EOF
$ pipenv install
Installing dependencies from Pipfile.lock (dfae9f)…
🎃 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
OK, this reprduces entirely random: [12345]$ pipenv install Creating a virtualenv for this project… Pipfile: /home/churchyard/tmp/12345/Pipfile Using /usr/bin/python2 (2.7.17) to create virtualenv… ⠋ Creating virtual environment...Already using interpreter /usr/bin/python2 New python executable in /home/churchyard/.local/share/virtualenvs/12345-Zmm6krPD/bin/python2 Also creating executable in /home/churchyard/.local/share/virtualenvs/12345-Zmm6krPD/bin/python Installing setuptools, pip, wheel... done. Running virtualenv with interpreter /usr/bin/python2 ✔ Successfully created virtual environment! Virtualenv location: /home/churchyard/.local/share/virtualenvs/12345-Zmm6krPD Pipfile.lock not found, creating… Locking [dev-packages] dependencies… ✘ Locking Failed! Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/pipenv/resolver.py", line 126, in <module> main() File "/usr/lib/python3.7/site-packages/pipenv/resolver.py", line 97, in main from pipenv.vendor.vistir.compat import ResourceWarning File "/usr/lib/python3.7/site-packages/pipenv/__init__.py", line 22, in <module> from pipenv.vendor.vistir.compat import ResourceWarning, fs_str File "/usr/lib/python3.7/site-packages/pipenv/vendor/vistir/__init__.py", line 4, in <module> from .compat import ( File "/usr/lib/python3.7/site-packages/pipenv/vendor/vistir/compat.py", line 36, in <module> from pathlib2 import Path File "/usr/lib/python3.7/site-packages/pathlib2/__init__.py", line 52, in <module> from scandir import scandir as os_scandir ImportError: No module named scandir File "/usr/lib/python3.7/site-packages/pipenv/resolver.py", line 126, in <module> main() File "/usr/lib/python3.7/site-packages/pipenv/resolver.py", line 97, in main from pipenv.vendor.vistir.compat import ResourceWarning File "/usr/lib/python3.7/site-packages/pipenv/__init__.py", line 22, in <module> from pipenv.vendor.vistir.compat import ResourceWarning, fs_str File "/usr/lib/python3.7/site-packages/pipenv/vendor/vistir/__init__.py", line 4, in <module> from .compat import ( File "/usr/lib/python3.7/site-packages/pipenv/vendor/vistir/compat.py", line 36, in <module> from pathlib2 import Path File "/usr/lib/python3.7/site-packages/pathlib2/__init__.py", line 52, in <module> from scandir import scandir as os_scandir ImportError: No module named scandir OK, so pipenv runs /usr/lib/python3.7/site-packages/pathlib2/__init__.py with Python 2.7. It cannot find scandir, because it doesn't look for it in /usr/lib64/python3.7/site-packages/ I'll just bundle pathlib2, scandirs, backports.lru_cache again. Could you please test pipenv on various Fedoras? f32: https://src.fedoraproject.org/rpms/pipenv/pull-request/19 f31: https://src.fedoraproject.org/rpms/pipenv/pull-request/20 f30: https://src.fedoraproject.org/rpms/pipenv/pull-request/21 f29: https://src.fedoraproject.org/rpms/pipenv/pull-request/22 Note that the patches are slightly different, but I kept the release number same on purpose to make further cherry-picking easier. Tested all Fedoras with the original reproducer and it seems to be fixed. I am going to test it more on my F31 because I have some tasks for S2I I need pipenv for. Tested on Fedora 31 with Python 2.7, 3.6 and 3.7 in virtual environments and everything works. Thanks! FEDORA-2019-b9d986e330 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-b9d986e330 FEDORA-2019-b5f53f4280 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-b5f53f4280 pipenv-2018.11.26-12.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-de521ba933 pipenv-2018.11.26-12.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-b9d986e330 pipenv-2018.11.26-12.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-b5f53f4280 pipenv-2018.11.26-12.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report. pipenv-2018.11.26-12.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. pipenv-2018.11.26-12.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report. |