Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
paths for venv
#5
(Jun-13-2022, 01:18 AM)snippsat Wrote:
Quote:so if you are cd'd into your venv directory, pip and python know that it is a venv directory, such as because something special is in there?
No it's the activate that dos it,you see it become (req_env) then can cd to whatever directory and will always use python/pip from that environment as long is activated (req_env).
in terms of paths being checked by an outsider program, how can it know if that directory is a python virtual environment or not. i was hoping it might be as simple as there being a file, sub directory, or symlink, of a particular name pattern in there somewhere to test existence or mode.

can one script be run in one terminal window in one environment and while that is still running a script be run in a different terminal window (different shell) in a different environment with both being cd'd in the same working directory (such as home directory) at the same time?

(Jun-13-2022, 01:18 AM)snippsat Wrote: Virtual environment is very common work flow in Python,so editor like eg VS Code, PyCharm pick up environment automatically or have easy way to choose it.

will my editors pick up on it? i have a big wrapper around emacs as well as several commands that carry out common changes i do at the shell command level. most, but not all, of these are in Python, one is in bash plus awk.
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
paths for venv - by Skaperen - Jun-11-2022, 12:42 AM
RE: paths for venv - by snippsat - Jun-11-2022, 03:59 PM
RE: paths for venv - by Skaperen - Jun-13-2022, 12:23 AM
RE: paths for venv - by snippsat - Jun-13-2022, 01:18 AM
RE: paths for venv - by Skaperen - Jun-13-2022, 10:06 PM
RE: paths for venv - by snippsat - Jun-14-2022, 10:04 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,972 Jul-25-2023, 10:41 AM
Last Post: Aften1961
Question Emacs 28 and venv pisterpesto 1 2,047 Nov-30-2022, 05:55 AM
Last Post: Larz60+
  check for duplicate file paths Skaperen 4 1,406 Jun-21-2022, 06:29 AM
Last Post: Gribouillis
  venv conflict at shell prompt Skaperen 3 2,963 Feb-21-2019, 02:18 AM
Last Post: Larz60+
  PyCharm virtual environment (venv) issues? j.crater 1 2,376 Aug-14-2018, 10:22 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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