Change the active version in Pyenv from anaconda to plain Python

What happened so far

I think many people use Anaconda when they first come into contact with Python. However, there are various theories that Anaconda destroys the environment (see: Python installation method and 3 reasons for not using Anaconda) After all, I think that there are many people who stop using it and switch to Google colab. At that time, I had to switch the active Python version, and the procedure was a little complicated, so I will write it.

Conclusion

[Use the glocal command. ](Switch version with #glocal command) If you don't know the version of Python you're switching to

$ pyenv versions

After confirming the current version and the version you want to switch to

$ pyenv global (Version name to switch to)

is. People who ask, "What is the current version?" Should read it in order.

View installed list

$ pyenv versions
* system (set by /Users/yuri/.pyenv/version)
  3.7.2
  anaconda3-4.2.0
  anaconda3-5.0.1

The system marked with * is the currently active version.

/Users/yuri/.pyenv/It is said that it is specified by version.



 So let's take a look at that file.


#### **`/Users/yuri/.pyenv/version`**

anaconda3-5.0.1


 This is it. So, if you delete this file,

$ rm -r /Users/yuri/.pyenv/version $ pyenv versions

 It became a system.
 If you want to use 3.7.2, just write 3.7.2 in the file above.

## Switch versions with the glocal command
 If you know the version you want to switch to, you can use the glocal command to switch instantly.
 Let's say you want to switch to 3.7.2.

$ pyenv global 3.7.2 $ pyenv versions system (set by /Users/yuri/.pyenv/version)

 It's like this. It became 3.7.2.

## At the end
 I'm also an Anaconda user at first, and Python is Anaconda! I thought, but Anaconda seems to have various drawbacks. If I have time, I would like to investigate in detail and write an article next time. Nowadays, there are convenient things such as Google Colab that can be executed on a browser, so unless you need to build an environment locally, I think you should use that.

## reference
 I used this as a reference.
 [How to use Pyenv](https://qiita.com/mogom625/items/b1b673f530a05ec6b423)


Recommended Posts

Change the active version in Pyenv from anaconda to plain Python
What to do if Python does not switch from the System version in pyenv
Anaconda updated from 4.2.0 to 4.3.0 (python3.5 updated to python3.6)
Change python version using pyenv
How to change Python version
Change the standard output destination to a file in Python
In the python command python points to python3.8
How to get the Python version
Change the Python version of Homebrew
[Python] Change the alphabet to numbers
Did not change from Python 2 to 3
Feel free to change the label of the legend in Seaborn in python
The result of installing python in Anaconda
How to check opencv version in python
Convert from Markdown to HTML in Python
Python 3.3 in Anaconda
[Completed version] Try to find out the number of residents in the town from the address list with Python
[Python] How to change the date format (display format)
From file to graph drawing in Python. Elementary elementary
To dynamically replace the next method in python
Draw graphs in Julia ... Leave the graphs to Python
Change the decimal point of logging from, to.
How to specify TLS version in python requests
The trick to write flatten concisely in python
How to use tkinter with python in pyenv
Procedure from uninstalling pyenv to installing again (anaconda)
From Python environment construction to virtual environment construction with anaconda
I want to display the progress in Python!
Even if the development language is changed to python3 in Cloud9, version 2 is displayed in python --version
A solution to the problem that the Python version in Conda cannot be changed
Notes from installing Homebrew to building an Anaconda environment for Python with pyenv
I want to use Python in the environment of pyenv + pipenv on Windows 10
Python version (PHP to Python) that deletes the subsequent character string from the specified character string (extension)
Use PIL in Python to extract only the data you want from Exif
Examples and solutions that the Python version specified in pyenv does not run
[Python] How to remove duplicate values from the list
How to retrieve the nth largest value in Python
I tried to graph the packages installed in Python
The wall of changing the Django service from Python 2.7 to Python 3
How to get the variable name itself in python
How to get the number of digits in Python
Changes from Python 3.0 to Python 3.5
Changes from Python 2 to Python 3.0
How to know the current directory in Python in Blender
App development to tweet in Python from Visual Studio 2017
Output the time from the time the program was started in python
Convert the image in .zip to PDF with Python
I wanted to use the Python library from MATLAB
Find the part that is 575 from Wikipedia in Python
[Python] Change standard input from keyboard to text file
The first step to getting Blender available from Python
How to download files from Selenium in Python in Chrome
I want to write in Python! (3) Utilize the mock
How to change static directory from default in Flask
[Work efficiency] How to change file names in Python
Install the latest Python from pyenv installed with homebrew
Python version switching (pyenv)
[Python] How to output the list values in order
To do the equivalent of Ruby's ObjectSpace._id2ref in Python
I want to use the R dataset in python
Python OpenCV tried to display the image in text.