First install the environment you can refer to this article https://www.zhihu.com/question/30496889I use Chrome to browse, download Webdriver's address is http://chromedriver.storage.googleapis.com/index.html,Click to download the historical version of Chrome: https://www.chromedownloads.net/Note that the downloaded version must correspond to its own version of Chrome, or the error will be as follows: version support for Chromedriver can be viewed from http://npm.taobao.org/mirrors/chromedriver/
Since I installed the commonly used package by default python2.7, I decided to upgrade to the newest python3.4 after encountering some Chinese coding problems, but the process encountered some minor problems. Since no article can be searched to include all the things I need, the process is recorded. Some of the scripts come from major technical forums.
First, download and install the latest Python (3.4)
Python website Download the latest installation can be.
https://www.python.org
Second, change
default, if you decide to write too many rows, do not want each row with/n, you can use the "" "..." form to write:Print ("' Line1Line2Line3 ")The output is the same as the end Plus/n:Line1Line2Line3Boolean values can be operated with and, or, and not. The and operation is the same as the operation, and only all the results of the true,and operation are true; or operations are or operations, as long as one of them is the result of a true,or operation is a true not operation is a non-operation,
Python3 makes a web crawler and python3 Crawlers
0x01
When the Spring Festival is idle (there are many idle times), I wrote a simple program to crawl some jokes and read the program writing process. The first time I came into contact with crawlers, I read such a post. It was not very convenient to crawl photos of my sister online on the egg. As a result, I caught some pictures by myself.
Technology inspires
Cause: After centos6.5 is installed, when you type Python from the command line, the default is the python2.6.6 version, and the Python3 version is not installed. You also want to learn python3, so you need to install the Python3 version under centos6.5."Python3 Installation"1. Download the
Brief introduction:Ubuntu default python2.7 version, if you want to install python3.x version, please remember python2.7 version must not uninstall!!! But even if my python3.x version was successfully installed, when I ran the Python script, the system would go to the python2.7 version by default, although we could, in this run the script before the terminal Input command called the version number:python3.x
1. Add Python2 to System environment variablesOpen, Control Panel \ System and Security \ System, select Advanced system settings, environment variables, select Path, click Edit, New, add D:\Python\python27 and D:\Python\python27\Scripts to environment variables respectively.Note:The Python3 installation can optionally be automatically added to the system environment variable, as is not selected, and the method is the same as the Python2 add process.2
Windows10 under Python3 and Python2 installation (ii)
Python2.exe, Python3.exe and PIP2, PIP3 settings
Description: Installation Python3 and Python2 please refer to this series of tutorials (i)
1. Add Python2 to System environment variables
Open, Control Panel \ System and Security \ System, select Advanced system settings, environment variables, select Path, c
The default Python version of CentOS 7 is python2.7.5. Because Yum relies on the default Python version, it is necessary to keep the default version and modify the Yum file header before you can start installing Update Python2 and Python3 two latest versions. (Coexistence of Python2 and Python3)One. Keep the default Python version 2.7.5, and modify the Yum header to keep yum dependent on the default version
1. Download Python3 and Python2Go to Python website, link https://www.python.org/Select Downloads--->windows, click Enter to see the Python version you are looking forThis article has chosen:Python3.5.2, click on the link below to download directly, Https://www.python.org/ftp/python/3.5.2/python-3.5.2rc1-amd64.exePython2.7.9, click on the link below to download directly, Https://www.python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi2,
1. Download Python3 and Python2Go to Python website, link https://www.python.org/Select Downloads--->windows, click Enter to see the Python version you are looking forThis article has chosen:Python3.5.2, click on the link below to download directly, Https://www.python.org/ftp/python/3.5.2/python-3.5.2rc1-amd64.exePython2.7.9, click on the link below to download directly, Https://www.python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi2,
Encoding and decoding in python3 (excellent understanding) and python3 Encoding
Encoding and decoding are for data. What can we do with data? It is used for display, storage, and transmission;
To store and transmit data, we certainly hope that the smaller the data, the better, so we invented the UTF-8 data encoding display. It intelligently represents English in one byte, and European characters in two byte
Application ScenariosPython2 is already installed on the default server; And I installed the Python3, and use Python3;The PIP installation package is installed on the Python2 by default.But I want to use PIP to install the package installed on the Python3, so the following solution;1: Install virtualenv on the server firstTerminal: sudo pip install virtualenv2: F
Python3 digit Number (6), python3 digit number
The Python numeric data type is used to store numeric values.
The data type cannot be changed, which means that if you change the value of the numeric data type, the memory space will be re-allocated.
The Number object will be created when the following instances assign values to variables:
1 var1 = 12 var2 = 10
You can also use the del statement to delete some
Python3 Basic Data Type _ 1, python3 Data Type _ 1
As a last resort, you have to learn about python3. We have learned that py2 is very different from py3, but we can feel it after learning it, such as print.
However, the same code can be executed using py3 and py2, and the results are similar. Let's take a look.
Probably because I was a beginner, I haven't found
Python3 encoding problem, python3 Encoding
Continue to collect python3 encoding questions
Sources of information Peng Cheng Sina Blog (reproduced) http://blog.sina.com.cn/s/blog_6d7cf9e50102vo90.html this Peng Cheng teacher wrote on python3 encoding blog write particularly clear, directly pick it down. For your referen
Windows10 Python3 and Python2 are installed simultaneously (i.)
Install Python3 and Python2
specifically , this article is carried out under the Windows64 bit system , 32-bit system please download the appropriate version of the installation package, the installation method is similar.
With Python development, the environment has two Python2 and python3, and s
Under Linux, the alias command can be used to solve the coexistence problem of Python3 and python2, in fact, under Windows can also use this idea to solve the coexistence of python2 and Python3, but the steps are slightly cumbersome.First set up a bat file to establish the corresponding relationship between aliases.@doskey python3="c:\Users\Administrator\Anaconda
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.