In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to install the runtime in python. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
What on earth can Python do?
1. Web application development
Python is often used for Web development. For example, through the mod_wsgi module, Apache can run Web programs written in Python. Python defines the WSGI standard application interface to coordinate the communication between the Http server and Python-based Web programs.
Some Web frameworks, such as Django,TurboGears,web2py,Zope, make it easy for programmers to develop and manage complex Web programs.
2. Automated scripts for operating system management and server operation and maintenance
In many operating systems, Python is a standard system component.
Most Linux distributions, as well as NetBSD, OpenBSD, and Mac OS X, integrate Python to run Python directly under the terminal.
There are installers for Linux distributions written in Python, such as Ubuntu's Ubiquity installer and Red Hat Linux and Fedora's Anaconda installer. Gentoo Linux uses Python to write its Portage package management system.
The Python standard library contains several libraries that invoke operating system functions. Through pywin32, a third-party software package, Python can access Windows's COM services and other Windows API. Using the IronPython,Python program, you can call .net Framework directly. Generally speaking, the system management script written by Python is better than the ordinary shell script in readability, performance, code reuse and expansibility.
3. Scientific calculation
NumPy,SciPy,Matplotlib allows Python programmers to write scientific computing programs.
4. Desktop software
PyQt, PySide, wxPython and PyGTK are powerful tools for Python to rapidly develop desktop applications.
5. Server software (network software)
Python has perfect support for various network protocols, so it is often used to write server software and web crawlers. The third-party library Twisted supports asynchronous network programming and most standard network protocols (including clients and servers), and provides a variety of tools that are widely used to write high-performance server software.
6. Games
Many games use C++ to write high-performance modules such as graphics display, while Python or Lua are used to write the logic and server of the game. Compared to Python,Lua, it is simpler and smaller, while Python supports more features and data types.
7. Conceptual implementation, early product prototypes and iterations
YouTube, Google, Yahoo!, and NASA all use Python extensively internally.
How to install other packages, tools and libraries in Python
After installing Python, you often need to call some Python libraries when writing Python programs. For example, a variety of libraries are called in the following code, all of which need to be installed by yourself.
Here are several common ways to install the runtime for python
(1) it is installed online using the pip install method (usually the pip tool is installed automatically when Python is installed)
1. Open the cmd window
two。 Go to the Scripts folder under the Python installation directory
3. Pip install "Library name"
The following command is an example of installing the numpy library online using the pip install statement in the cmd window: (where C:\ Users\ john\ AppData\ Local\ Programs\ Python\ Python35 is my Python installation location and needs to be changed to your own)
(2) download the whl file and install it offline
1. Download the installation whl file of Python-related libraries on the Internet and copy it to the Scripts folder under the python installation directory.
two。 Execute the following statement in the cmd window to install:
Pip3.5 install C:\ Users\ john\ AppData\ Local\ Programs\ Python\ Python35\ Scripts\ pip-9.0.1-py2.py3-none-any.whl
Statement description: because the version of python I installed is python3.5, what I use here is python3.6. In addition, you can see what to use directly under the Scripts folder under the python installation directory.
"C:\ Users\ john\ AppData\ Local\ Programs\ Python\ Python35\ Scripts\ pip-9.0.1-py2.py3-none-any.whl" is the path and name of my offline installation package
Note: to ensure that the above Scripts folder path is in the system variable path, if you do not need to add it manually (usually this environment variable will be automatically added after installing python)
3. Note that when downloading whl files, you should choose the whl file that suits your computer version.
How to view the version of the installation package supported by native Python, execute the following statement in the cmd window:
After running, you will print out the version of the installation package supported by native python, and download the whl installation file suitable for your own version according to this:
(3) after installing mingw and git, download the source code of Python library with git, compile the source file and install python library.
Note: because some runners are not specialized python libraries, but only provide a python interface for Python to call, the normal pip install method cannot be installed successfully. For example, XGBoost.
(4) if you install PyCharm, the IDE of python, you can install or uninstall some Python runtime online in its menu interface.
1. Open PyCharm and select File- > Default Settings in the menu bar, where Project Interpreter:
This interface lists the currently installed python runtime, and select one that can be upgraded or deleted.
two。 Select the plus icon in the above interface, and the interface for installing the runtime online will appear, and you can search for the runtime online and install:
What is the method of installing the runtime on python? so much for sharing here. I hope the above content can be helpful to you and you can learn more. If you think the article is good, you can share it for more people to see.
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.