classification
Title: venv creates pyvenv.cfg with wrong home
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, wvxvw
Priority: normal Keywords:

Created on 2018-11-18 12:08 by wvxvw, last changed 2019-04-17 10:11 by eric.smith. This issue is now closed.

Messages (2)
msg330044 - (view) Author: wvxvw (wvxvw) Date: 2018-11-18 12:08
I must have some environment variable set, which affects this behavior, but I don't know which one that would be.

What happens is as follows:

No matter in what directory I execute this command:

python3 -m venv .venv

or

python3 -m venv $(pwd)/.venv

no matter if the path is relative or absolute, the value of "home" in generated pyvenv.cfg will point to some other virtual environment I created earlier.

I would expect that at the minimum, if you aren't going to use the argument given on command line, then, at the minimum, alert the user about it.  Why even bother given the argument in this case?

PS. I discovered this, perhaps, due to using Emacs + pyvenv-* commands which probably set some environment variables.
msg330046 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-11-18 12:59
You're going to have to provide some information, we can't guess at what's going on. At the very least:

What OS? What shell? Which exact version of Python? How was it installed? Where is the file pyvenv.cfg that shows the problem? What are its entire contents? What are all of your environment variable?
History
Date User Action Args
2019-04-17 10:11:42eric.smithsetstatus: pending -> closed
resolution: not a bug
stage: resolved
2018-11-20 00:07:06eric.smithsetstatus: open -> pending
2018-11-18 12:59:31eric.smithsetnosy: + eric.smith
messages: + msg330046
2018-11-18 12:08:07wvxvwcreate