Replies: 3 comments 8 replies
-
that seems like a bug, whats the operating system and where is the python from |
Beta Was this translation helpful? Give feedback.
8 replies
-
I get similar results on Windows: (cwd is
(Note So I don't think this is architecture/OS specific. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is also not an issue from the
Lines 1 to 5 in 61f7c27 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Imagine I have a conda env like this
conda create -n pytest-q python=3.8
conda activate pytest-q
pip install pytest
If I look at the Python path now, it looks like this:
Imagine further, I have a
test.py
module like this:Running
pytest
through Python gives this resultAs explained here, it is standard Python behavior to include the current working directory. Meaning everything is good here.
However, running
pytest
directly yieldsSo not only was the current working directory added as well, the binary directory of my conda env, i.e.
$CONDA_PREFIX/bin
, was added as well.Is this expected? I couldn't find any documentation on this.
Edit:
Ok, this has nothing to do with
conda
. Can reproduce the same behavior inside avirtualenv
.Beta Was this translation helpful? Give feedback.
All reactions