Deepin system deploy the development and running environment of Python3.5, deepinpython3.5

Source: Internet
Author: User

Deepin system deploy the development and running environment of Python3.5, deepinpython3.5

Deploy the development and running environment of Python3.5 in the deepin System

1 Overview

I am a newbie. I recently want to learn python interface automated testing. So I want to record the relevant learning experience and experience. I hope it will be helpful to my friends who are just like me.

2 download

InpythonDownloadpython3.5Environment

wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz

For example, the downloaded file isPython-3.5.1.tgz

3. Decompress

Decompress the package:

tar -xvzf Python-3.5.1.tgz

Generate directoryPython-3.5.1

4 installation

Enter the DirectoryPython-3.5.1To configure:


./configure --with-ssl --prefix=/usr/local/python35

Compilation and installation:
makemake install
5. Create a virtual environment

When using the python development environment, it is generally established in a virtual environment, which can isolate the project runtime environment and prevent interference from different dependent projects.

Becausepython3.5Self-containedpyvenvSo you do not have to reinstall the tool.virtualenvThird-party Library:

Vast @ vast-PC :~ /Desktop/tester/Python-3.5.1/Tools/scripts $ ls-l | grep pyvenv-rwxr-xr-x 1 vast 232 2015 pyvenv

Go to the pyvenv directory and run:

./pyvenv

Generate a clonepython3.5.1And then run:

source ./py3venv/bin/activate

To change the current terminal environmentpython3.5.1Environment, see the terminal with _ VENV_PROMPT _ in front of the terminal indicates that it has been successful:

__VENV_PROMPT__vast@vast-PC:~/Desktop/tester/Python-3.5.1$ 

Then enter the commandpython3, You can see thatpython3.5.1Running interface:

__VENV_PROMPT__vast@vast-PC:~/Desktop/tester/Python-3.5.1$ python3Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linuxType "help", "copyright", "credits" or "license" for more information.>>> 
6. Install pip

After creating a virtual environment, the next step is to install a third-party library management tool for the virtual environment.pip

First download the get-pip.py address in the https://bootstrap.pypa.io/get-pip.py through the wget command

wget https://bootstrap.pypa.io/get-pip.py

Then run the file in Python.

 python get-pip.py
However, the terminal prompts that the permission is insufficient.
An error is always prompted. It takes a long time for you to find out that the initial password of the root account is not set for Deepin by default.
su passwd root

Set a password

Then execute:

su root 

Repeat the preceding operations.

Only for participation. If any, please criticize and correct and discuss and learn from each other.

 

Reference: http://www.cnblogs.com/beer/p/5557497.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.