question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Python 2 virtualenvs

See original GitHub issue

Would you consider adding support for Python 2 virtualenvs if I’m contributing a PR?

There are various reasons for having that feature. E.g. packages which are Python 2 only (#65) or if you want to have something like flake8 for Python 2 and for Python 3 available.

This shouldn’t be to hard:

  • use virtualenv instead of venv in create_venv if Python 2 is the base Python
  • fix get_binaries_script so it is 2/3 compatible
  • add a --binary-suffix flag which is passed to expose_binaries_globally so you can install the same binary from multiple venvs (so maybe create a flake8-2.exe). To make upgrade work we have to store the suffix in a config file. But this might be an interesting feature even without Python 2 virtualenvs.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
stanislaw55commented, Jun 5, 2020

Hi, I would be very interested in having support in pipx for Python 2. Isolating old apps is in my opinion perfect use case for pipx.
Does anyone have some info about this feature?

1reaction
itsayellowcommented, Nov 19, 2020

Since Python 2 is EOL, this isn’t something we have the time or inclination to support in pipx.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing and using virtualenv with Python 2
Virtualenv is a tool used to create an isolated Python environment. This environment has its own installation directories that do not share ...
Read more >
Installing packages using pip and virtual environments
This guide discusses how to install packages using pip and a virtual environment manager: either venv for Python 3 or virtualenv for Python...
Read more >
How to create python 2.7 virtual environment using python 3.7
The venv module was introduced in Python 3.3, so you cannot use it to create virtual environments with python 2.7.
Read more >
Pipenv & Virtual Environments
virtualenv is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages...
Read more >
Setting Up Virtual Environments in Python
Create a virtual environment in your current directory for a project with the command: virtualenv my_project. "my_project" is whatever name you would like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found