Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Unix-based commands with Anaconda in Windows Operating System

I used to use several Unix-based commands with Anaconda 2 (i.e., Python 2.7) in Windows 7. For example, these commands ls, mkdir, rm,... can work properly with Anaconda Command Prompt.

Recently, I have upgraded to Windows 10 and installed Anaconda 3 running with Python 3.5. These command mentioned above cannot be used in the Anaconda 3. I have tried to uninstalled and reinstalled Anaconda 3 for times, but it can work as before.

Any one has a suggestion?

like image 706
Tung Avatar asked Mar 31 '16 22:03

Tung


People also ask

Can I use Unix commands in Windows?

The beauty of cygwin is that you can use Unix commands to work on files on Windows systems. This can be a lot faster than moving the files you need to work on to a Unix system, processing them there, and moving them back -- especially if you have work you'd like to schedule to run off hours.

How do I run Conda commands in Windows?

Access your start menu in the bottom-left corner and search for “anaconda“. Then, click on Anaconda Prompt. Wait until the process is complete, then close the Anaconda Prompt and open a CMD window. See if you're now able to run Conda commands.

Can I use Linux commands on Windows CMD?

The Windows Subsystem for Linux (WSL) allows you to run Linux inside Windows. The upcoming version of WSL will be using the real Linux kernel inside Windows. This WSL, also called Bash on Windows, gives you a Linux distribution in command line mode running as a regular Windows application.


2 Answers

At the command line in Anaconda Prompt, use conda to install the m2-base utilities:

conda install m2-base

This will give you the basic linux commands.

like image 87
soap262 Avatar answered Sep 30 '22 05:09

soap262


One simple way to have access to those commands on your windows machine would be to use cygwin. You can install that. Then open a "Cygwin Bash Shell" and in this shell you will be able to use ls, mkdir, rm, ... as well as create conda environments etc. You can use this instead of your command prompt if you want.

like image 37
Paul Avatar answered Sep 30 '22 06:09

Paul