Up

Choice of Python

 

There may be a library, which cannot be used for the latest version of Python. Hence, you must choose the version of Python, for which the library can be used. In this site, two ways of choosing a version of Python are explained. The first one is to select the download version at Python’s site, and the second one is to install the selected version in Anaconda.

At present (2020.12.25), Numpy library raises the error, which is explained due to Windows update (https://tinyurl.com/y3dm3h86). But, in Anaconda, this error is not raised.

 

Select the version of Python at Python’s website

Visit the website of Python

https://www.python.org/

the website shown in Figure A.1 is displayed.

 

Figure A.1

 

Put the mouse cursor on string “Downloads”, list of menu items will be shown (Figure A.2)

Figure A.2

 

Click on the menu item “All releases’, the website in Figure A3 will be shown.

Figure A.3

 

Near the bottom of this website, release versions are shown (Figure A4).

Figure A4

 

Click on the string of the version which you want. In Figure A4, Python 3.8.5 is selected.

The website in Figure A.5 will be shown.

Figure A.5

 

Near the bottom of the site, list of download files is shown (Figure A.6).

Figure A.6

 

Click on the string of the selected file. In Figure A.6, “Windows x86-64 executable installer” is selected.

When the file has been downloaded, the “Open” button will be shown at the lower left corner of the browser’s window (Figure A.7).

Figure A.7

 

Click on the “Open” button, then installing starts as in the usual way. For the usual way, visit this website.

 

 

Select the version of Python in Anaconda

By Anaconda, you can create a virtual environment with the specified version of Python. For installation of anaconda, this website provides a simple explanation.

To install the specified version of Python, execute conda create code as in Figure B.1.

Figure B1

 

The version to be installed is specified by the argument “python=3.8.5”, that is, the version is specified on the right hand side of equality sign =. In the case of Figure B.1, Python 3.8.5 will be installed in the virtual environment named py385.

To activate the created virtual environment, execute conda activate command as in Figure B2.

Figure B.2

 

That is, when you execute conda command

conda activate <name of the virtual environment>

the specified virtual environment becomes active.

The list of versions, which can be installed by conda install command can be gotten by conda search command as in Figure B.3.

Figure B.3

 

Part of an example output by conda search command is shown in Figure B.4.

Figure B.4

 

 

Up