I don't know what has been deleted, which makes the code unable to work properly ; It seems that the environment is broken Baidu is useless ; So I decided to reinstall python Environmental Science , By the way, record the steps .( Before, there were many environments , It may be caused by deletion )
lookup python3 The catalog of , Generally, the default directory is /Library/Frameworks/Python.framework/Versions/3.7
1.sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7
Delete the frame directly
2. Get into cd /Applications
Catalog , sudo rm -rf Python 3.7
Delete Python 3.7 Application directory
3. Get into /usr/local/bin
Catalog , see ls -l /usr/local/bin
Lower soft connection ,rm Python3.7
Delete related files and links
4. Delete manually python3.x Profile information open ~/.bash_profile
Open profile source ~/.bash_profile
Immediate effect
Finally, verify whether the deletion is clean , Input
python3
which python3
python3 --version
pip -V
Download from the official website : Jump to the official website
Tips : If the official website is slow to download, you can use the online disk to download
Online disk download ::python3.7/3.8
open ~/.bash_profile
Open profile
# To configure python3 and pip3 Information
alias python3="/usr/local/bin/python3.7"
alias pip3="/usr/local/bin/pip3"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
alias python3="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"
alias pip3="/Library/Frameworks/Python.framework/Versions/3.7/bin/pip3"
source ~/.bash_profile
Immediate effect
Test the console :
see python edition
python --version
python3 --version
View this machine python The installation directory
which python
which python3
sudo ln -s sudo ln -s /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 /usr/local/bin/python
# -s Fill in the following python3.7 Installation path for Followed by the soft connection address
Verify after configuration Input python and pip list
allure After decompression, you need to configure environment variables , Otherwise it can't start
export PATH=${
PATH}:/Users/songpeilun/allure-2.13.0/bin
export JMETER_HOME=/Users/songpeilun/apache-jmeter-5.0/bin