In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "Window 10 how to install python 3.7 + selenium", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Window 10 how to install python 3.7 + selenium" this article.
First, understand python
Brief introduction:
Python is a computer programming language. Is a dynamic, object-oriented scripting language, originally designed for writing automated scripts (shell). With the continuous update of versions and the addition of new features of the language, it is more and more used for independent, large-scale project development.
Application areas:
Web and Internet development
Scientific calculation and statistics
Education
Desktop interface development
Software development
Back-end development
Advantages:
Simple: Python is a language that represents the idea of simplism. Reading a good Python program is like reading English. It enables you to focus on solving problems rather than understanding the language itself.
Easy to learn: Python is extremely easy to use because Python has extremely simple documentation [6].
Speed: the bottom layer of Python is written in C, and many standard libraries and third-party libraries are also written in C, which runs very fast.
Free, open source: Python is one of the FLOSS (free / open source software). Users are free to publish a copy of the software, read its source code, make changes to it, and use part of it in new free software. FLOSS is based on the concept of sharing knowledge by a group.
High-level language: when writing programs in Python, you don't have to consider low-level details such as how to manage the memory your program uses.
Portability: because of its open source nature, Python has been ported to many platforms (modified to work on different platforms). These platforms include Linux, Windows, FreeBSD, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acom RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows CE, PocketPC, Symbian and Google's android platform based on linux.
Explanation: a program written in a compiled language such as C or C++ can be converted from a source file (i.e. C or C++) to a language used by your computer (binaries, i.e. 0 and 1). This process is done through the compiler and different tags and options.
When running the program, the link / reloader software copies your program from the hard drive to memory and runs it. Programs written in Python do not need to be compiled into binary code. You can run the program directly from the source code.
Inside the computer, the Python interpreter converts the source code into an intermediate form called bytecode, which is then translated into the machine language used by the computer and run. This makes it easier to use Python. It also makes Python programs easier to port.
Object oriented: Python supports both process oriented programming and object oriented programming. In a "process-oriented" language, programs are built from procedures or simply functions that are reusable code. In an "object-oriented" language, programs are built from objects that are a combination of data and functions.
Extensibility: if you need a piece of critical code to run faster or want some algorithms to be private, you can write some programs in C or C++, and then use them in Python programs.
Embeddability: you can embed Python into the CumberCraft + program to provide scripting functionality to program users.
Rich libraries: the Python standard library is really huge. It can help with a variety of tasks, including regular expressions, document generation, unit testing, threading, databases, web browsers, CGI, FTP, e-mail, XML, XML-RPC, HTML, WAV files, password systems, GUI (graphical user interface), Tk, and other system-related operations. This is called Python's "full-featured" concept. In addition to the standard libraries, there are many other high-quality libraries, such as wxPython, Twisted, Python image libraries, and so on.
Canonical code: Python uses forced indentation to make the code readable. Programs written in Python do not need to be compiled into binary code.
Disadvantages:
Single-line statements and command-line output problems: most of the time, programs cannot be written on a single line, such as import sys;for I in sys.path:print I. While perl and awk do not have this restriction, it is more convenient to complete a simple program under shell, and there is no need to write the program to a .py file like Python.
Unique syntax: this should not be called a limitation, but it still confuses many beginners by indenting it to distinguish between sentence relationships. Even experienced Python programmers can fall into a trap.
Slow speed: compared with C and C++ here.
Second, understand setuptools, pip, selenuim
Setuptools:
Is a sub-project of Python Enterprise Application Kit (PEAK), it is a set of Python distutilsde tools enhancement tools (applicable to Python 2.3.5 or above, 64-bit platform is applicable to Python 2.4 or above), allowing programmers to more easily create and publish Python packages, especially those that are dependent on other packages.
Pip:
Is a modern, general-purpose Python package management tool. Provides the functions of finding, downloading, installing and uninstalling Python packages.
Selenium:
Is a complete web application testing system, including test recording (selenium IDE), writing and running (Selenium Remote Control) and test parallel processing (Selenium Grid). The core Selenium Core of Selenium is based on JsUnit and is written entirely by JavaScript, so it can be used on any browser that supports JavaScript.
Selenium can simulate real browsers, automated testing tools, support a variety of browsers, crawlers are mainly used to solve JavaScript rendering problems.
3. Installation environment
System: window 10 64 bit
Software: python
Tool: setuptools pip
Module: selenuim
Browser: Chrome chromedriver
Link under all packages: https://pan.baidu.com/s/1WrSfm4ab_gO3lHGnEkfsIw
Extraction code: qbi8
Fourth, installation step 1. Download python 3.7
Download address on the official website: https://www.python.org/downloads/windows/
two。 Install python 3.7
Choose any installation method (note: check "Add Python to PATH" below)
(if the path addition fails, you can manually set it in the environment variable: this computer-> Properties-> Advanced system Settings-> Advanced-> Environment variable-> system variable-> Path, add your python installation path)
Open IDLE (shell that comes with python: scripting)
3. Install setuptools
Download address: https://pypi.org/project/setuptools/
Unpack the downloaded setuptools and put it in the directory where the python is located.
Go to the directory where setuptools is located on the command line (cmd) and execute python setup.py install to install
4. Install pip
Download address: https://pypi.org/project/pip/#files
After download, it is still extracted to the same directory as python.
On the command line, go to the file directory where pip is located and execute python setup.py install
Pip update command: python-m pip install-- upgrade pip
5. Install selenium
On the command line, go to the Script directory of python and execute pip install-U selenium
Enter from selenium import webdriver by IDLE after the installation is completed. If no error is reported, the installation is successful.
Note: pip and setuptools should be in the same directory as python, otherwise the command line python is invalid.
6. Install Chromedriver
Download address: http://npm.taobao.org/mirrors/chromedriver
Note: the installation of Chromedriver should correspond to the version of Chrome. After the installation is complete, unzip it and copy the chromedriver.exe to the same directory as python.
Tip: if chromedriver.exe runs an error under this directory, try adding this path to the system environment variable, or run chromedriver.exe under the python script directory (recommended)
The above is all the contents of the article "how to install python 3.7 + selenium in Window 10". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.