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

Function missing virtualenv.create_environment #1585

Closed
Alex2761 opened this issue Feb 11, 2020 · 5 comments · Fixed by #1592
Closed

Function missing virtualenv.create_environment #1585

Alex2761 opened this issue Feb 11, 2020 · 5 comments · Fixed by #1592

Comments

@Alex2761
Copy link

@Alex2761 Alex2761 commented Feb 11, 2020

Hi,

I haven't found any commit or changelog for this change, therefore I create this ticket.
If I'm wrong about this please just close the ticket.
As the title says the function is no longer available

H:>pip install --upgrade virtualenv
Collecting virtualenv
Downloading https://files.pythonhosted.org/packages/51/89/6f2827025b28eee6236b1905555b0fbe1749f27bcbd3732ee137c31a21a8/virtualenv-20.0.2-py2.py3-none-any.whl (4.6MB)
100% |████████████████████████████████| 4.6MB 1.1MB/s
Requirement already satisfied, skipping upgrade: filelock<4,>=3.0.0 in c:\python37-32\lib\site-packages (from virtualenv) (3.0.12)
Requirement already satisfied, skipping upgrade: appdirs<2,>=1.4.3 in c:\python37-32\lib\site-packages (from virtualenv) (1.4.3)
Requirement already satisfied, skipping upgrade: importlib-metadata<2,>=0.12; python_version < "3.8" in c:\python37-32\lib\site-packages (from virtualenv) (1.5.0)
Requirement already satisfied, skipping upgrade: six<2,>=1.12.0 in c:\python37-32\lib\site-packages (from virtualenv) (1.12.0)
Requirement already satisfied, skipping upgrade: distlib<1,>=0.3.0 in c:\python37-32\lib\site-packages (from virtualenv) (0.3.0)
Requirement already satisfied, skipping upgrade: zipp>=0.5 in c:\python37-32\lib\site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv) (2.2.0)
Installing collected packages: virtualenv
Found existing installation: virtualenv 16.7.9
Uninstalling virtualenv-16.7.9:
Successfully uninstalled virtualenv-16.7.9
Successfully installed virtualenv-20.0.2
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

H:>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import virtualenv
virtualenv.create_environment
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'virtualenv' has no attribute 'create_environment'
virtualenv.create_environment

OS: Windows 10
pip list
Package Version


appdirs 1.4.3
certifi 2019.6.16
chardet 3.0.4
Click 7.0
colorama 0.4.1
distlib 0.3.0
filelock 3.0.12
idna 2.8
importlib-metadata 1.5.0
keyboard 0.13.4
mongoquery 1.3.5
munch 2.3.2
numpy 1.17.2
paho-mqtt 1.4.0
pandas 0.25.1
pip 19.0.3
pipenv 2018.11.26
plotly 4.1.1
psutil 5.6.3
pymongo 3.9.0
python-dateutil 2.8.0
pytz 2019.3
PyYAML 5.1.2
requests 2.22.0
retrying 1.3.3
setuptools 40.8.0
six 1.12.0
urllib3 1.25.6
virtualenv 20.0.2
virtualenv-clone 0.5.3
zipp 2.2.0

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Feb 11, 2020

With the new major release we've changed the api, now you should be using run_via_cli method, though you might need to import it from virtualenv.run 🤔

@schinckel
Copy link

@schinckel schinckel commented Feb 12, 2020

Any idea when this was removed? It's breaking my workflow using poetry, and I'd like to be able to restore to a version that works.

@schinckel
Copy link

@schinckel schinckel commented Feb 12, 2020

Ah, it seems to be there in 16.7.9

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Feb 12, 2020

It was removed as part of the rewrite effort.

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Feb 12, 2020

Hello, a fix for this issue has been released via virtualenv 20.0.2; see https://pypi.org/project/virtualenv/20.0.3/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-3-2020-02-12) . Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release.

thanks

openstack-mirroring pushed a commit to openstack/pbr that referenced this issue Aug 6, 2020
virtualenv is undergoing a rewrite and has changed how the programmatic
API works [1]. Switch to the "new way".

While we're here, we also need to get Python 2.7 tests passing again.
That requires dropping support for upper-constraints and using our own,
limited local constraints based on supported Python versions. We also
need to migrate integration tests since those run with Python 3 now.
Update the scenarios for pip/setuptools in integration testing
similarly. Finally clean up the installation of all devstack repos as
requirements are managed different now. Instead of worrying about
syncing them we use constraints.

[1] pypa/virtualenv#1585 (comment)

Change-Id: I493e88985d2c4d09612fea4d20d8ffa20043a0cb
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: https://review.opendev.org/739014
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Aug 6, 2020
* Update pbr from branch 'master'
  - Add support for virtualenv 20.x
    
    virtualenv is undergoing a rewrite and has changed how the programmatic
    API works [1]. Switch to the "new way".
    
    While we're here, we also need to get Python 2.7 tests passing again.
    That requires dropping support for upper-constraints and using our own,
    limited local constraints based on supported Python versions. We also
    need to migrate integration tests since those run with Python 3 now.
    Update the scenarios for pip/setuptools in integration testing
    similarly. Finally clean up the installation of all devstack repos as
    requirements are managed different now. Instead of worrying about
    syncing them we use constraints.
    
    [1] pypa/virtualenv#1585 (comment)
    
    Change-Id: I493e88985d2c4d09612fea4d20d8ffa20043a0cb
    Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
    Depends-On: https://review.opendev.org/739014
@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants