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. 

7 comments
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

@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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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.