I have used a virtual environment to set up the python virtual environment.
Here are some of the commands i am able to run when the virtual environment is active
(.venv) amol@amol-IdeaPad-Gaming-3-15ARH05:~/WorkSpace/frappe/frappe-bench$ which python
/home/amol/WorkSpace/frappe/.venv/bin/python
(.venv) amol@amol-IdeaPad-Gaming-3-15ARH05:~/WorkSpace/frappe/frappe-bench$ which bench
/home/amol/WorkSpace/frappe/.venv/bin/bench
(.venv) amol@amol-IdeaPad-Gaming-3-15ARH05:~/WorkSpace/frappe/frappe-bench$ python
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import frappe;
>>> frappe
<module 'frappe' from '/home/amol/WorkSpace/frappe/frappe-bench/apps/frappe/frappe/__init__.py'>
>>>
Now the command bench start
that works with the Procfile
seems to have a different python environment than one being used by my terminal
This is error i get.
16:26:56 watch.1 | /home/amol/WorkSpace/frappe/frappe-bench/env/bin/python: Error while finding module specification for 'frappe.utils.bench_helper' (ModuleNotFoundError: No module named 'frappe')
What my understanding of things is it is clearly using a different python environment than the one used by my terminal.
This is the error when i run bench watch
using the command line.
(.venv) amol@amol-IdeaPad-Gaming-3-15ARH05:~/WorkSpace/frappe/frappe-bench$ bench watch
/home/amol/WorkSpace/frappe/frappe-bench/env/bin/python: Error while finding module specification for 'frappe.utils.bench_helper' (ModuleNotFoundError: No module named 'frappe')
I was hoping if someone from the frappe team could help me solve this issue.
Thanks Regards.