| Summary: | mkvirtualenv does not work with python3-virtualenvwrapper | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Guillaume Bernard <gllm.bernard> |
| Component: | python-virtualenvwrapper | Assignee: | Lumír Balhar <lbalhar> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 27 | CC: | infra-sig, kevin, lbalhar, mike, rcarvalh, sanjay.ankur |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-virtualenvwrapper-4.8.2-4.fc28 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-30 13:13:31 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: | |
|
Description
Guillaume Bernard
2016-10-18 09:12:26 UTC
Run into this today. A workaround is to add these lines to your .bashrc before sourcing virtualenvwrapper.sh (or virtualenvwrapper_lazy.sh): # https://bugzilla.redhat.com/show_bug.cgi?id=1402486 # https://bugzilla.redhat.com/show_bug.cgi?id=1386134 VIRTUALENVWRAPPER_PYTHON="$(command which python3)" VIRTUALENVWRAPPER_VIRTUALENV="py3-virtualenv" VIRTUALENVWRAPPER_VIRTUALENV_CLONE="virtualenv-clone-3" Note that there is a problem also with VIRTUALENVWRAPPER_VIRTUALENV_CLONE, which is used by the `cpvirtualenv` command. I think those should be the default fallback values defined in /usr/bin/virtualenvwrapper.sh (provided by python3-virtualenvwrapper): --- /usr/bin/virtualenvwrapper.sh 2015-08-23 16:50:42.000000000 +0200 +++ /tmp/virtualenvwrapper.sh 2017-01-05 11:28:07.667318278 +0100 @@ -47,19 +47,19 @@ # Locate the global Python where virtualenvwrapper is installed. if [ "$VIRTUALENVWRAPPER_PYTHON" = "" ] then - VIRTUALENVWRAPPER_PYTHON="$(command \which python)" + VIRTUALENVWRAPPER_PYTHON="$(command which python3)" fi # Set the name of the virtualenv app to use. if [ "$VIRTUALENVWRAPPER_VIRTUALENV" = "" ] then - VIRTUALENVWRAPPER_VIRTUALENV="virtualenv" + VIRTUALENVWRAPPER_VIRTUALENV="py3-virtualenv" fi # Set the name of the virtualenv-clone app to use. if [ "$VIRTUALENVWRAPPER_VIRTUALENV_CLONE" = "" ] then - VIRTUALENVWRAPPER_VIRTUALENV_CLONE="virtualenv-clone" + VIRTUALENVWRAPPER_VIRTUALENV_CLONE="virtualenv-clone-3" fi # Define script folder depending on the platorm (Win32/Unix) I wonder if it would it make more sense to have two virtualenvwrapper.sh files: - virtualenvwrapper-3.sh that's set up to use py3 stuff - virtualenvwrapper-2.sh that's set up to use py2 stuff The packaging guidelines do mention that something of the sort should be done: https://fedoraproject.org/wiki/Packaging:Python#Naming If executables are to be shipped for both python 2 and python 3: - Both python 2 and python 3 variants must provide symlinks with a '-X' and '-X.Y' suffix (python runtime major version, or python runtime major.minor version), unless upstream already provides appropriately versioned executables without the dash. - The unversioned executable must be the python2 version. - For example, the python3 version of "coverage" must ship executables /usr/bin/coverage-3 and /usr/bin/coverage-3.4 (assuming python3 is currently version 3.4), while the python2 version must provide /usr/bin/coverage, /usr/bin/coverage-2 and /usr/bin/coverage-2.7 (assuming python2 version 2.7). That would solve these issues? Having different executables would be fine, though, at least at the time of my previous comments, there were also small code changes needed. Haven't checked since then. This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. Resurrecting this due to the fact that it is still an issue. As fedora drags kicking and screaming into being all python3 by default, i think we seriously need to get this fixed. Beyond this just not working correctly, it also creates Python2 virtual environments by default! I'll try and evaluate whether or not that warrants another bug. Also, I think we should continue the discussion about the same defaults above, now that 3.6 recommends using `python -m venv` over all other virutalenv solutions. (What about clone?) *** Bug 1402486 has been marked as a duplicate of this bug. *** The project ideally should take advantage of python 3's venv module [0] for the python3 venvs. A temporary workaround would be the changes proposed at comment 1 and 2. [0] https://bitbucket.org/virtualenvwrapper/virtualenvwrapper/issues/309/python-36-depreciation I like the idea mentioned in the first two comments here so I created a new topic in Virtualenvwrapper google groups to discuss it. I am also willing to implement the proposed idea. https://groups.google.com/forum/#!topic/virtualenvwrapper/XTUliDcLnEk In the meantime, I'll use mentioned patch to change fallback values in shell script provided by python3- subpackage and I'll also address naming rules violations. I've implemented mentioned functionality in a downstream patch. Pull request is here: https://src.fedoraproject.org/rpms/python-virtualenvwrapper/pull-request/1 Feel free to do a review and/or test it. Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=25832320 Thanks a bunch for that! python-virtualenvwrapper-4.8.2-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1c442d645a python-virtualenvwrapper-4.8.2-4.fc28 has been pushed to the Fedora 28 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-2018-1c442d645a python-virtualenvwrapper-4.8.2-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. |