Python Forum
venv conflict at shell prompt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
venv conflict at shell prompt
#3
i have python 2.7.12 (not used for anything new) and 3.5.2. i am wondering what other versions i can run.

i have dabbled around with Linux Containers at the system level as opposed to black box tools like Docker (primarily for running services). this can be done with quite low overhead

one thing i wonder is how venv and pyenv deal with scripts that have coded the host interpreter path, on the hash-bang or elsewhere including my version switcher:
if bytes == str:
    import os,sys
    for p in os.environ.get('PATH','').split(':'):
        if p and os.path.exists(p+'/python3'):
            os.execvp(p+'/python3',['python3']+sys.argv)
the above code would normally be inserted into a file. i suppose it might work as a module but i suggest inserting it into the file you want to have run in python3. it's not that big.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
venv conflict at shell prompt - by Skaperen - Feb-20-2019, 08:00 PM
RE: venv conflict at shell prompt - by Larz60+ - Feb-20-2019, 09:52 PM
RE: venv conflict at shell prompt - by Skaperen - Feb-21-2019, 02:00 AM
RE: venv conflict at shell prompt - by Larz60+ - Feb-21-2019, 02:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The command python3 -m venv venv does not correctly set sys.path echeadle 2 2,837 Jul-25-2023, 10:41 AM
Last Post: Aften1961
Question Emacs 28 and venv pisterpesto 1 1,969 Nov-30-2022, 05:55 AM
Last Post: Larz60+
  paths for venv Skaperen 5 1,922 Jun-14-2022, 10:04 AM
Last Post: snippsat
  arg and keyword arg conflict: what to raise Skaperen 5 2,883 Jun-22-2020, 12:43 AM
Last Post: Skaperen
  annoying conflict: stat Skaperen 2 2,265 Dec-26-2019, 06:04 AM
Last Post: Skaperen
  PyCharm virtual environment (venv) issues? j.crater 1 2,327 Aug-14-2018, 10:22 PM
Last Post: Larz60+
  import time conflict Skaperen 2 2,910 Oct-15-2017, 07:44 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020