Python usage problem summary

After installing python3.7, pip cannot be used, prompting invalid syntax

The reason for this kind of problem is that the C:\Users***\AppData\Local\Programs\Python\Python37-32\Scripts folder is not added to the system environment variable.
Just add it to the path in the environment variable.

In addition, pip can only be used in cmd, and cannot be used in the python command line to
install the python package. Specific operations: Win+R, enter CMD, and then the black command box belongs to pip install **** (package name)

The official address installation package is too slow

Mirror source
Alibaba Cloud http://mirrors.aliyun.com/pypi/simple/

University of Science and Technology of China https://pypi.mirrors.ustc.edu.cn/simple/

Douban http://pypi.douban.com/simple/

Tsinghua University https://pypi.tuna.tsinghua.edu.cn/simple/

University of Science and Technology of China http://pypi.mirrors.ustc.edu.cn/simple/

Installation command (take the numpy package mirrored by the University of Science and Technology as an example):

pip install numpy -i https://pypi.mirrors.ustc.edu.cn/simple/ 

Error in matplotlib 3.3.0 version

“MatplotlibDeprecationWarning: The epoch2num function was deprecated in Matplotlib 3.3 and will be removed two minor releases later. base = dates.epoch2num(dt.asi8 / 1.0e9)”

X week changes from year to random number

The solution only needs to add one line of code:

plt.rcParams['date.epoch'] = '0000-12-31'

Although it will report an error, it will solve the error in the drawing process. Subsequent versions will solve this problem.
The solution comes from StackOverflow .

Guess you like

Origin blog.csdn.net/weixin_40575956/article/details/105547686