[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

Install the latest Python and pip on Windows.

Hello everyone. This is Saito from the infrastructure team.
This time, I will introduce how to install version 3.5 of the programming language Python.

Python is often used on servers, but
the versions of Python that are pre-installed on servers are often outdated.

So let's go ahead and install Python, which has the latest features.

Installation instructions

On Windows, installation is performed using an installer, but
there are some points that get stuck when using the installed command.
The purpose of this article is to create an environment where you can run python commands and pip commands on the command prompt.

I will focus on the following points.

1. Install Python

You can use python by downloading the installer from the URL below and following the instructions.
https://www.python.org/downloads/
python_install

2. Decide where to install

This time, I installed
Python35 under C:Usersbeyond Set the installation directory to a location that does not require administrator privileges.
" C:Program Files ", you may not be able to use the command due to permissions.

3. Setting the path

Let's set the Path to the directory created by the installer.

C:UsersbeyondPython35 C:UsersbeyondPython35Scripts

It is best to set the Path using the Control Panel or
the Rapid Environment Editor

4. install pip

Download the python file below.
https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

run the downloaded file ( ez_setup.py

> chdir C:UsersbeyondDownloads > ls ez_setup.py > python ez_setup.py

After running the downloaded file, it's time to prepare pip.

> easy_install.exe pip

This completes the environment construction.

To check the version, use the options below.

> python -V > pip -V

Install packages with pip

If there are any modules you need, use pip to install the packages.
Use the pip command as follows.

> pip install --upgrade pip > pip install<package>

Let's try installing the following packages using pip.

> pip install virtualenv > pip install pip-tools > pip install ipython > pip install wheel

Use the following command to see the list of installed packages.

> pip freeze

Precautions when installing

If a C/C++ compiler is not installed on Windows,
problems may occur such as pip not working properly depending on the package.
In that case, you will receive an error requesting you to install Visual C++.
For python 2.7, this plugin can solve the problem.
If you want to install without installing the compiler,

https://pypi.python.org/pypi/

compiled ( .whl ) file is distributed.
the wheel mentioned earlier is installed.

> pip install wheel

Finally, let's install using wheel.
For example, suppose you want to install the following packages:

https://pypi.python.org/pypi/ScalaFunctional/0.5.0

scala

From here, first install the
ScalaFunctional-0.5.0-py2.py3-none-any.whl go to the download location and run pip.

> chdir C:UsersbeyondDownloads > ls ez_setup.py ScalaFunctional-0.5.0-py2.py3-none-any.whl > pip install ScalaFunctional-0.5.0-py2.py3-none-any.whl

The installation is now complete. thank you for your hard work.

Now, just type python on the command prompt and python will start.
the installed package by typing import

> python Python 3.5.0a3 (v3.5.0a3:82656e28b5e5, Mar 30 2015, 00:12:00) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import this

Please try installing Python & pip using the method I introduced. Have a good import life!

 

2020/03/09 P.S.

This article was featured on courseduck.com

We have a lot of content where you can learn Python for free, so please take a look.

The Best Courses to Learn Python in 2020

https://www.courseduck.com/programming/python/

If you found this article helpful , please give it a like!
0
Loading...
0 votes, average: 0.00 / 10
8,464
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

The person who wrote this article

About the author