[For beginners] What to do after installing Anaconda

Introduction

--As the title suggests, this is a memo of what to do immediately after installing Anaconda. --For beginners. However, it is for people who have experience with other programming languages and want to do machine learning or something complicated. --Environment: --windows 10 (OS-dependent stories are few) - Anaconda3-2019-10 --This is the story immediately after installing Anaconda and before trying to add a package. ――The necessary information is basically explained on another site, so it is a summary or almost a memorandum.

Understand package management tools

――When you use python for business such as machine learning and web application development, you basically add the packages you need. --There are many explanations on how to add packages on the premise of one of the different package managers in the information on the Web, so you need to understand the difference yourself and rewrite it as needed, not simply copy and paste. --So, let's understand the keywords such as conda (as a package management tool), pip, conda-forge. --qiita article: Organize information for dealing with Anaconda (focusing on Python installation method and package management method) --qiita article: What is the difference between pip and conda? --qiita article: How to change the repository destination that conda looks for (adding conda-forge) -conda and pip: Danger of mixing ――I think you should also know about pip and pip3. - https://teratail.com/questions/46066 ――In short, it is safer not to mix pip and conda.

Understand and prepare the virtual environment

――No matter how careful you are when adding packages, the environment often breaks, and especially for machine learning frameworks, you want an independent environment that is highly dependent on the package version. --In addition, there are many articles and explanations that beginners need to suddenly create a virtual environment, and above all, there is a possibility that they will lose their motivation unless they fail to build the environment and reinstall Anaconda. There are also, so I think it is necessary. ――By the way, conda also has a function as a virtual environment management tool. --First, let's understand the virtual environment by referring to this Site. ――As explained on this site, you can also use pip inside the virtual environment of conda. ――And it is enough if you can understand the environment including not only the package but also the interpreter. --qiita article: pyenv, pyenv-virtualenv, venv, Anaconda, Pipenv. I use Pipenv. --Let's use conda because it's Anaconda. --Creating a virtual environment is very easy. --Start Anaconda Prompt --First, get the latest version of conda

  conda update -n base -c defaults conda

--Create a virtual environment

  conda create -n myenv python=3.7

-* Myenv sets an arbitrary character string with the virtual environment name, python = 3.7 is the version specification of python

--Confirm that it has been created.

  conda info -e

--Switch virtual environment

  conda activate myenv

--Install the required packages. --However, do not mix pip and conda --The following sites are useful for deepening your understanding of other commands. --qiita article: [Python] Create a virtual environment with Anaconda --qiita article: Anaconda command list memo - https://www.python.jp/install/anaconda/conda.html --It also describes how to clone the base.

Prepare a development environment

――If you get lost for the time being, use VS Code, there is a lot of information. Pycharm may be fine. Before VS Code became popular, I continued to use Spider, but I didn't find it easy to code and debug. --After installing VSCode, when you open the py file, it will notify you of extension candidates and proceed to follow the flow, "Python extension for Visual Studio Code" will be installed and you can do most of the things Will be. --You can switch the virtual environment by clicking base: conda at the bottom left. --You can debug with F5 ――I can execute it, but I am annoyed with the following error displayed on Terminal. I think this only happens on Windows.

   "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",

--The error is no longer displayed.

Summary

--Understand package management tools and virtual environments. ――If the development environment goes safely, use VS Code.

Recommended Posts

[For beginners] What to do after installing Anaconda
What to do after installing Linux (Ubuntu)
13 Things to Do After Installing Ubuntu 20.04 LTS
10 Things to Do After Installing Ubuntu 18.04 LTS
For beginners to build an Anaconda environment. (Memo)
What to do if scrapy doesn't work after installing scrapy with pip on mac
Everything for beginners to be able to do machine learning
~ Tips for beginners to Python ③ ~
What to do if your Jupyter Notebook for beginners asks for a password or token
TypeError: unsupported operand type (s) for-: What to do when'datetime.time'and'datetime.time'
The first thing to do after installing CentOS Stream minimally
What to do when Ubuntu crashes
What to do if yum breaks
What is scraping? [Summary for beginners]
What to do with PYTHON release?
What is xg boost (1) (for beginners)
What to do to get tensorflow-gpu to work
What to do if Python doesn't work on Git for Windows
What to do if intellisense doesn't work with Anaconda + VSCode + Tensorflow2.1
VRM output for VRoid cluster, what should I do after all?
Django: What to do if TemplateDoesNotExist at / admin / after setting templates
[For IT beginners] What to do when the rev command cannot be used with Git Bash
[Memorandum] What to do when a warning appears after executing pip list
Data analysis, what do you do after all?
What to do if you get stuck during Anaconda installation on Linux
What to do if No Python documentation found for ... appears in pydoc
Beginners read "Introduction to TensorFlow 2.0 for Experts"
Vim Command Memorandum ~ Beginners will be able to do what they want! ~
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
What to do if you get an error when installing Dlib (Ubuntu)
Let's summarize what you want to do.
After all, what should I use to do type comparisons in Python?
How to build an environment when you want to use python2.7 after installing Anaconda3
Notes from installing Homebrew to building an Anaconda environment for Python with pyenv
What to do if you get an error when installing python with pyenv
[For beginners] After all, what is written in Deep Learning made from scratch?
Memo # 4 for Python beginners to read "Detailed Python Grammar"
An introduction to object-oriented programming for beginners by beginners
Variable naming anti-patterns that beginners tend to do
How to make Spigot plugin (for Java beginners)
Python for super beginners Python for super beginners # Easy to get angry
What to do if pipreqs results in UnicodeDecodeError
What to do if you can't pipenv shell
[Python] What I did to do Unit Test
Note: What to do if pip install fails
What to do if mod_fcgid cannot resolve UnicodeEncodeError
Memo # 3 for Python beginners to read "Detailed Python Grammar"
Memo # 1 for Python beginners to read "Detailed Python Grammar"
How to use data analysis tools for beginners
What to do if rails s doesn't work
Try to calculate RPN in Python (for beginners)
Memo # 2 for Python beginners to read "Detailed Python Grammar"
What to do if pip cannot be installed
What to do when PermissionError of tempfile.mkstemp occurs
What to do if atom autocomplete-python doesn't work
What I did before installing Docker for Windows
Memo # 7 for Python beginners to read "Detailed Python Grammar"
What to do to get google spreadsheet in python
What to do if Docker-sync suddenly stops working
Introduction to Programming (Python) TA Tendency for beginners
Procedure from uninstalling pyenv to installing again (anaconda)