justinmayer/virtualfish

Option to create virtual environment with last version of pip

rousseldenis opened this issue · 5 comments

  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.
  • I am willing to lend a hand to help implement this feature.

Feature Request

Hi,

As I understand and tested, virtualfish is embedding its own virtualenv version. As tested, create a virtualenv by hand, get pip version, it says at this time (20.2.2). Do it with virtualfish, it says 20.0.2.

The idea is to add an option (and a environment variable wrapper too?), to automatically update pip at virtual environment creation.

I faced issues with unaligned versions of pip _vendor packages code mismatch. The pip ugrade fixed that.

To reproduce :

With the actual version of virtualfish (2.4.0), create a new environment (2.7 in my case), install six==1.10.0, then install six==1.15.0. You will encounter error.

To get fixed:

With the actual version of virtualfish (2.4.0), create a new environment (2.7 in my case), upgrade pip, then install six==1.10.0, . Then, install six==1.15.0. No error.

Thanks for your support

Indeed, I succeeded in function creation to upgrade pip at env creation. But IMHO that could be embedded in core

Hi Denis.

As I understand and tested, virtualfish is embedding its own virtualenv version.

VirtualFish does not embed its own version of Virtualenv. VirtualFish depends on Virtualenv, so if Virtualenv is not already on $PATH when VirtualFish is installed, Virtualenv will be automatically be installed (just like any other Python dependency).

The idea is to add an option (and a environment variable wrapper too?), to automatically update pip at virtual environment creation.

That facility already exists. Enable the Global Requirements plugin, run vf requirements, and add pip.

I was able to replicate the issue of getting different Pip versions when using VirtualFish vs. Virtualenv itself, but that was only because the versions of Virtualenv were different. As soon as I upgraded the Virtualenv package that VirtualFish was using to match the version of the other instance of Virtualenv, then both produced environments containing the same up-to-date v20.2.2.

In summary, I suspect that the instance of Virtualenv found by VirtualFish on your system is outdated, and upgrading it would yield newer versions of Pip. Is there anything else I can do to assist you with this?

In summary, I suspect that the instance of Virtualenv found by VirtualFish on your system is outdated, and upgrading it would yield newer versions of Pip. Is there anything else I can do to assist you with this?

No, the virtualenv is the last one.

But, I did the little function to upgrade pip at env creation. That's sufficent for now. Thanks for your quick reply !

As mentioned above, it's already possible for VirtualFish to automatically upgrade Pip upon new environment creation, so I took the liberty of documenting that in the FAQ via 9b4e9cb.