Hi, When I run prefect deployment build command, i...
# prefect-getting-started
n
Hi, When I run prefect deployment build command, it is not considering the virtual env that is activated. It shows no module found for few modules, though those are installed in the same virtual env.
Script at 'gpt_review.py' encountered an exception: ModuleNotFoundError("No module named 'tqdm'")
See the below command, I ran prefect deployment command, it throws the error, when I import the module in python shell, it is imported. How to create prefect deployment with virtual env?
Copy code
(myenv) navaneethan_ramasamy_turing_com@character-ai:/var/opt/repo/delivery-workflow$ prefect deployment build gpt_review.py:gpt_review --name=gpt_review
Script at 'gpt_review.py' encountered an exception: ModuleNotFoundError("No module named 'tqdm'")
(myenv) navaneethan_ramasamy_turing_com@character-ai:/var/opt/repo/delivery-workflow$ ipython
Python 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.22.2 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import tqdm

In [2]:                                                                                                                                                                                                                    
Do you really want to exit ([y]/n)? 
(myenv) navaneethan_ramasamy_turing_com@character-ai:/var/opt/repo/delivery-workflow$
n
hi @Navaneethan - can you show what
which python
returns?
n
@Nate
Copy code
(myenv) navaneethan_ramasamy_turing_com@character-ai:~$ which python
/home/navaneethan_ramasamy_turing_com/miniconda3/envs/myenv/bin/python
n
i suspect there's something weird about your interpreter path / installation of prefect have you installed
prefect-client
or
prefect
? if you dont mind,
pip list | grep prefect
in that same place would be useful
n
Copy code
(myenv) navaneethan_ramasamy_turing_com@character-ai:~$ 
(myenv) navaneethan_ramasamy_turing_com@character-ai:~$ pip list | grep prefect
prefect                       2.15.0
n
weird, do you have the whole trace from when it failed? something feels weird here