current position:Home>How to install python, configure environment variables, and change sources for third-party libraries
How to install python, configure environment variables, and change sources for third-party libraries
2022-08-06 06:31:58【friendly classmates】
python入门必会
文章目录
一、windows下python的安装
- 打开官网(https://www.python.org),选择Downloads(You can also download directly from the app store)
2.然后选择相应的版本python3.xxxx
3.下载完成后打开,这里我下载的是python 3.6.4
(1)勾选Add Python 3.6 to PATH是把Python的安装路径添加到系统环境变量的Path变量中(这样我们就少一步自己添加环境变量啦_)
(2)选择Install Now默认将pythone安装在C盘目录下(作为一个新时代好少女,我当然不会选择这个(╹▽╹))
(3)选择Customize installation可自定义路径(我选这个) - 选择Customize installation后,这一步默认全选,然后点击next(这里看到我是真的选了下载pip的,后来不知道为什么没有下载,导致我的入门遇到顶级灾难o(╥﹏╥)o)
3.这一步要勾选上Install for all users,路径根据自己的需要选择(我安装在了F盘下的Python36文件夹下)
4.点击Install,就开始安装啦,过程很快
安装成功
5.验证一下是否安装成功
转载自:big orange
二、手动将python配置到系统环境
1.右击此电脑,点击属性,选择高级设置,然后点击环境变量(N)
2.双击path(用户变量和系统变量都可以)
- 点击新建,比如新建一个D://python3.10
三、pythonThe method of changing the source of the third-party library
(以numpy为例)
- pip换源
a. 临时换源:
pip install requests -i http://pypi .tuna.tsinghua.edu.cn/simple/
b.永久修改(It is not recommended to permanently change the source):
打开此电脑,搜索%APPDATA%
按回车,Jump to the following directory,新建pip文件夹
创建pip.ini文件
打开文件夹,输入以下内容,关闭即可(The mirror source can be replaced)
阿里云:
http://mirrors.aliyun.com/pypi/simple/
中国科技大学:
https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban):
http://pypi.douban.com/simple/
清华大学:
http:/pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学:
http:/pypi.mirrors.ustc.edu.cn/simple/
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
2.whl 换源,以numpy为例(whlLibraries can be installed offline,但下载whlLibraries require networking)
打开网址Python Extension Packages for Windows
下载相应的whl文件(按Ctrl + F搜索numpy,点击numpy)
选择相应pythonversion library download
After downloading, migrate the installation package to python路径下去
比如:d:\python3.9\python.exe\lib\site-packages
然后再cmd执行命令:
pip install numpy
After completion, it will show that the installation was successful
copyright notice
author[friendly classmates],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/218/202208060519187152.html
The sidebar is recommended
- Get the input and output information of the onnx model Python script
- Common parameters of python matplotlib and drawing examples
- python axessubplot_ use matplotlib's savefig to save plots generated from python pandas (AxesSubPlot)
- Qixi Festival_A Python program that moves the mouse to play the confession balloon (available in August 2022)
- Python knowledge points: Python variables, data types
- Python open virtual environment
- Python uses Hive to query data
- python+opencv study notes
- python--log processing logging.handlers.TimedRotatingFileHandler
- The problem that yum is unavailable after python upgrade
guess what you like
Application of bubbling method in program thought in advanced scl programming in python and 1200PLC
Tensorflow C++ deployment practice - python environment establishment on linux platform (2)
Python graduation design works based on django framework personal blog system completed finished product (7) mid-term inspection report
Python graduation design works based on django framework personal blog system completed design (8) graduation design thesis template
Python graduation design works are based on the django framework enterprise company website. The finished product (1) Development overview
Application of bubbling method in program thought in advanced scl programming in python and 1200PLC
python get all characters before or after a specified character
[Python | Word Cloud] Draw a super beautiful word cloud from chat records (Happy Qixi Festival, classmate Zeng)
Python data visualization-----make a global earthquake scatter plot
Python. Iterator object iter() (Based on the iterator feature, dismantle the complicated single-line "forced code", and understand the "secret method" for selecting fixed-length elements of the sequence.)
Random recommended
- Python's common modules of threading and Thread modules The first stage of thread implementation
- Blender Python Programming: Creating Emitting Materials
- Python multiprocessing
- How does python implement image edge detection
- Django paging method
- django regex
- How does Python represent time?2 modules, 3 ways, 1 text to understand~
- Modify column name and row index in pandas DataFrame
- [python pandas groupby]
- Python Daily Practice (New Question Bank of Niu Ke) - Day 20: Dictionary Practice
- [LeetCode brush questions] Hash table - some questions are implemented with built-in functions (with Python code)
- [LeetCode brush questions] Linked list topic (1) (with Python code)
- [Small case of python learning] Simulation system invasion to enhance interest
- Getting Started with Python Basics - Essential Knowledge for Getting Started
- How does Python represent time?2 modules, 3 ways, 1 text to get it~
- Python office software automation, master openpyxl operation in 5 minutes
- Introduction to Python Basics - Variables, Strings
- [python2] remove the u in front of the unicode string
- How to use the Python Color class to draw text
- How to use Asyncio Python web programming
- 27 Python artificial intelligence libraries have been sorted out, it is recommended to collect!
- [Python] Word2Vec predicts what will be left if I subtract 'love' from my 'life'
- When I export a pandas package, there is a problem. If I don't import it, there is no problem. Is this not enough memory?
- Python version 3.7.4 How can I install locust successfully?
- How does python use pyinstaller to package music into exe, that is, play background music when running the packaged program?
- Python use pyinstaller how to wrap up music exe, is to run a packaged program play background music?
- Rescue 007 of graph traversal application, detailed analysis of python version
- 27 Python artificial intelligence libraries have been sorted out, it is recommended to collect~
- pandas DataFrame data filtering (2)
- Python is how to represent time?- two modules, three ways, complete the ~ 1
- The definition of pycharm writing python code
- Problems defining functions in Python
- Python Socket Network Programming
- Django server running error
- Python image processing notes - image matching based on Harris corners (skimage)
- (Thirteen--1) Concurrent programming of python (thread, queue, process, coroutine, process thread coroutine comparison)
- (12) Python's memory management mechanism
- Python crawler entry case day07: Hippopx
- Django reports an error ModuleNotFoundError: No module named 'mysqlclient'
- Python study notes