Running a Dash app via command promt... from a specific anaconda enviroment

Hi all,

I’ve recently starting using DASH (it’s great). At first I used the root( base) environment in Anaconda.
I coded a test app, and dragged the python file into Command Prompt, it then hosted the dash locally. Which worked fine!

However, I have now created an environment in anaconda, specially for my dashboard. I have now, through a lot of pain, pointed Spyder ( the IDE i’m using ), to my new environment. This seems to working okay ( i’m able to import required packages)

Where i’m now having issues is running the python file from command Prompt, it cant seem to find the packages required for the script to run. (e.g dash, and others).

My question is how do run the python script from command line, (via a specific environment).

PLEASE HELP! I’ve been wrecking my brains on this for a few days now!!


  1. What is the error you get?

  2. What is the command you are using?

Hi mbkupfer,

Thanks for the help. I’m simply dragging the python file into the command promt.

It looks like it is complaining about the package ‘numpy’ missing, however when I do a ‘conda list’ command in the anaconda prompt it show that the package is installed.
What is interesting is that the package is not installed in my base environment, which is where I think this is trying to run the script from.

To summarise: I have an environment called ‘map_env’, which has all my required packages installed. I also have the ‘base’ environment, which is the standards environment that comes with Anaconda. How do I run this file ( or alternatively launch an app to my local host), using my ‘map_env’ as opposed to the base environment?