Using conda without anaconda-navigator
I find that anaconda-navigator makes virtual environment in a very messy way. To get better control I use a minimal miniconda, and create the virtual envs myself .
This is the way I do it, on Windows 7, and using Pycharm CE 2017.2 x64.
- Install Miniconda3.
I install it for ‘all users’ in folder C:\ProgramData\Miniconda3. - Open ‘Anaconda Prompt’, find link in ‘Start’.
Navigate to Miniconda:cd C:\ProgramData\Miniconda3
- Create the new virtual enviroment ‘Machine_learning’:
conda create --name Machine_learning
- For machine learning you will at least use Pandas and Seaborn:
conda install -n Machine_learning pandas seaborn
This will also install the dependacies Numpy, Matplotlib and Statsmodel. - Go to Pycharm under: ‘File’ – ‘Settings’ – ‘Project:Machine_Learning’ – ‘Project Interpreter’. Under ‘Project Interpreter’ go to python.exe in your virtual environment. ‘ProgramData’ is a hidden folder, so make it unhidden or type in the path.
- Click the green Conda circle to the right, and you are ready to go. You should see your installed package; if not restart Pycharm.
- Hereafter use the green ‘+’ to install packages. Conda will install dependacies automatically.
Comments are closed.