I recently started using Anaconda Prompt instead of the Windows CLI. I note that standard CLI commands like 'cd' to change directory work in Anaconda Prompt, but other standard commands like 'ls' do not work. How can I list the contents in a directory in Anaconda prompt? Do I have to import the os module or can I do this directly? Thanks
Go with the mouse to the Windows Icon (lower left) and start typing "Anaconda". There should show up some matching entries. Select "Anaconda Prompt". A new command window, named "Anaconda Prompt" will open.
The conda command is the primary interface for managing installations of various packages. It can: Query and search the Anaconda package index and current Anaconda installation.
Anaconda prompt is similar to a terminal or command prompt (cmd). It refers to a black screen used to type in the commands by the user. You can download conda using a GUI installer.
List of commonly used commands in anaconda. conda info --envs : lists all environments. source activate <env name>: activate an environment. source deactivate: deactivate an environment. conda list : list all packages installed. conda create --name <env name> python=3 astroid babel : create new environment, specify version of python, ...
You can use 'dir' instead of 'ls' to list directories and files. In case you prefer Linux commands, install the package below in your Anaconda Prompt, then you can use basic Linux commands as well:
1 Answer 1. Anaconda Prompt takes most or all of the commands that Command Prompt takes, plus many that are unique to Conda, which you can both access introductions to and start further exploration of here. But as darthbith commented, you need to use dir, not ls, in Command Prompt and its derivatives.
You can also access help from the command line with the --help flag: The following commands are part of conda: If you have used pip and virtualenv in the past, you can use conda to perform all of the same operations. Pip is a package manager and virtualenv is an environment manager. Conda is both. Scroll to the right to see the entire table.
Anaconda Prompt takes most or all of the commands that Command Prompt takes, plus many that are unique to Conda, which you can both access introductions to and start further exploration of here.
But as darthbith commented, you need to use dir
, not ls
, in Command Prompt and its derivatives.
You can use 'dir' instead of 'ls' to list directories and files. In case you prefer Linux commands, install the package below in your Anaconda Prompt, then you can use basic Linux commands as well:
conda install m2-base
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With