We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For some reason, watchfiles does not use python from activated venv?
watchfiles
python
venv
Is it expected or not?
Yes, I'm sure I have activated venv, and it's being used.
Steps to reproduce:
rich
mre.py
import sys print("Python executable:", sys.executable) import rich print(rich.__all__)
$ python mre.py Python executable: D:\Code\project\.venv\Scripts\python.exe ['get_console', 'reconfigure', 'print', 'inspect', 'print_json']
$ watchfiles "python mre.py" . [05:21:25] watchfiles v0.23.0 👀 path="D:\Code\project" target="python mre.py" (command) filter=DefaultFilter... Python executable: C:\Program Files\Python312\python.exe Traceback (most recent call last): File "D:\Code\project\mre.py", line 4, in <module> import rich ModuleNotFoundError: No module named 'rich'
Windows-10-10.0.19045-SP0 10.0.19045
I tested with both cmd and bash, and have the same output everywhere. I use venv, created via PyCharm
cmd
bash
PyCharm
python: 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)], watchfiles: 0.23.0
No response
When I use watchfiles ".venv/Scripts/python mre.py" ., everything works as expected, since the python from venv is getting used.
watchfiles ".venv/Scripts/python mre.py" .
where python command result:
where python
$ where python D:\Code\project\.venv\Scripts\python.exe C:\Program Files\Python312\python.exe
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
For some reason,
watchfiles
does not usepython
from activatedvenv
?Is it expected or not?
Steps to reproduce
Yes, I'm sure I have activated venv, and it's being used.
Steps to reproduce:
venv
rich
(or any other dependency)mre.py
):watchfiles
:Operating System & Architecture
Windows-10-10.0.19045-SP0
10.0.19045
Environment
I tested with both
cmd
andbash
, and have the same output everywhere. I usevenv
, created viaPyCharm
Python & Watchfiles Version
python: 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)], watchfiles: 0.23.0
Rust & Cargo Version
No response
Additional info:
When I use
watchfiles ".venv/Scripts/python mre.py" .
, everything works as expected, since the python fromvenv
is getting used.where python
command result:The text was updated successfully, but these errors were encountered: