python:pip install *** SyntaxError: invalid syntax

在 https://pypi.org/project/pip/#downloads 下载并从目录进入控制台输入python setup.py install安装pip 20.0.2后,尝试使用pip install安装pymysql插件时报错:

Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> pip install pymysql
  File "", line 1
    pip install pymysql
        ^
SyntaxError: invalid syntax
>>>

退出python 3.8.2环境,重新输入指令,成功安装插件:

F:\python\Scripts> pip install pymysql
Collecting pymysql
  Downloading PyMySQL-0.9.3-py2.py3-none-any.whl (47 kB)
     |████████████████████████████████| 47 kB 309 kB/s
Installing collected packages: pymysql
Successfully installed pymysql-0.9.3
PS F:\python\Scripts> pip list
Package    Version
---------- -------
pip        20.0.2
PyMySQL    0.9.3
setuptools 41.2.0

附图:

python:pip install *** SyntaxError: invalid syntax_第1张图片

你可能感兴趣的:(python,pip)