Mac display Sudo:pip:command not found
After the Mac installs the PIP module, it prompts Sudo:pip:command not found with the PIP command
moyanzhudemacbook-pro:~sudo pip install pymysqlnot found
Command not found, indicates that the system did not find the module, either the system does not have the module installed, or the environment variable may not be set.
Mounting module
If you install the module, you can skip this step.
Need to go to the official website to download the Mac version of the pip corresponding to Python, and then follow the default path to install.
Configure environment variables or run directly
You can configure environment variables and then use the PIP command
Or go directly to the bin directory to execute the PIP method
#go to the Python bin directorymoyanzhudemacbook-pro:~ moyan$cd/library/frameworks/python.framework/versions/3.6/bin/#Excess Efficacymoyanzhudemacbook-pro:bin moyan$ Ls2to3 pydoc3 python3.6-Config2to3-3.6 pydoc3.6Python3.6measy_install-3.6 Python3 python3.6m-Configidle3 Python3-32Pyvenvidle3.6 Python3-config pyvenv-3.6PIP3 Python3.6PIP3.6 python3.6-32#Excess Efficacymoyanzhudemacbook-pro:bin moyan$ pwd/library/frameworks/python.framework/versions/3.6/bin#execute the following command:Moyanzhudemacbook-pro:bin moyan$./ PIP3 Install pymysqlcollecting pymysql downloading https:files.pythonhosted.org/packages/32/e8/222d9e1c7821f935d9f93a84f0b98afc219/pymysql-0.8.1-py2.py3-none-ANY.WHL (81kB)100% |████████████████████████████████| 81kB 295kb/s installing collected packages:pymysqlsuccessfully installed Pymysql-0.8.1You is using PIP version9.0.1, however version 10.0.1 isavailable. You should consider upgrading via the'pip install--upgrade pip'command.#the installation was successful when the sentence appearedsuccessfully installed pymysql-0.8.1
Encounter problems
Installation may encounter version mismatch issues, need to reinstall Python version
not find a version this satisfies the requirement pymysql ( from for Pymysql
MAC Display Sudo:pip:command not found