In order to run a snippet of python, just execute python (after having activated a conda environment with something like conda activate env1). Here we create a new python environment called env1 and a second one called env2.Ĭonda create -name env1 conda create -name env2 Check what environments existĬonda info -envs Activate a specific environmentĬonda activate env1 Install a new package into the active environmentĬonda install pip pip install scipy Check what packages are installed in the active environmentĬonda list Running Python inside the active environment (I get “conda 4.7.5”) Create a new environment To check that things are working, pull up a terminal window/command prompt and run conda -version. (This is important if you need to modify your $PATH or if you want to remove the distribution in the future.) Basic Use In my case, it was installed at /anaconda3. Once this is done, I recommend finding where anaconda was installed on your system. For me, this’ll be “Python 3.7 version” on macOS.Īfter downloading, go through the installation.
This guide is likely to get outdated fast, so browse and install the most up-to-date Anaconda Distribution here. I can also remove Anaconda-installed Python environments without worrying about deleting important system files. With Anaconda, I can have both versions running on my Mac, and I can switch between the two with ease.
If you do freelance work like myself, this can be useful if client ABC uses Python 3.3 and client DEF uses Python 3.7. AFAIK, the main reason Anaconda exists is because it allows you to have multiple instances of Python installed and potentially running at the same time. We’ll be using the Anaconda distribution to install Python. In this guide I’ll cover how I set up Python with a few tips and tricks to make it an easier transition from R and RStudio.