Every new VirtualEnv Created with Old Versions of Setuptools and PIP

Answered

Hi gang, every single time I create a new Virtualenv, PIP and Setuptools are out of date:

However, as you can see my base interpreter is current. 

Why is each new VirtualEnv carrying over older packages? I don't understand. 

1
7 comments

They are not that outdated. These are the same versions of setuptools and pip you get if you create a virtualenv using the standard venv module in Python 3.6.

0

Hi. I have the same problem (except my pip is version 10, not 9.0.3; and setuptools is 39.0.2). Those may be "correct" for version 3.7 of Python, which I'm using, but I have tried to update them to the latest version. When I try to do so, I fail, and for different reasons. The pip failure tells me to do the upgrade from the command line, which I have already done (to version 18), so the upgrade (pip install -U pip==18) just tells me I'm already at 18. And the setuptools upgrade fails for more complex reasons -- something about having version 39xxx of setuptools already in my venv directory.

What exactly is the problem with being able to update in the venv to the latest versions of these? And is there anyway to specify get the latest versions of all such packages when creating a new project?

Thank you for any and all help you can provide.

0
Avatar
Permanently deleted user

I also have the same problem. When I want to install new packages it fails and says your pip is old (version 10), and update it. But when I update, it says it is already up to date!

Did you found any solution or explanation?

0

@M Sadeghee

Make sure you are using the latest PyCharm version.

It should create an environment with pip 19.0.3 and setuptools 40.8.0
Also, vote for https://youtrack.jetbrains.com/issue/PY-23095 and feel free to leave comments.

0
Avatar
Permanently deleted user

Yes, this is a bug of PyCharm. If you don't need to upgrade it, just run it manually (in Windows in my case, but from git-bash):

python -m venv C:/Users/USERNAME/.virtualenvs/YOUR_PROJECT

And select existing virtual environment in settings (Add new interpreter > Virtualenv Environment)

0

In 2020.2 we started using virtualenv 20.x for virtual environments both on Python 2 and Python 3. It should also periodically update packaging tools in new enviroments on its own.

0

Newly created PyCharm projects continue to default to old versions of pip, wheel, and setuptools.

If this is a limitation coming from the version of VirtualEnv being used by PyCharm, it would be nice to have the ability to get around this in PyCharm.

In fact it would be great to have a default requirements file, where that latest version of pip and other tools could be included, that PyCharm would automagically pip install for every new project.

 

0

Please sign in to leave a comment.