2 years ago

#73142

test-img

Jack Hasselbring

How to run a python script with dependencies in the command line?

I understand that you can run a python script from the command line by entering in the file name. What changes do I need to make with a file that has dependencies?

To be more specific, I'm using Pycharm with a specific Anaconda environment for a project. This environment has packages included such as tensorflow and keras. I can run it directly from Pycharm, however when I try to run from the command line, it gives and error saying that

"there is no model named 'tensorflow'"

What can I do to the command line to signal that it should be using a conda environment, let's call it Env1. I've tried activating the environment in the conda command shell and I still get the same problem. How can I address this?

Thanks

python

dependencies

command

0 Answers

Your Answer

Accepted video resources