一:可能性解决方法一
《解决pycharm问题:module 'pip' has no attribute 'main'》
http://www.cnblogs.com/Fordestiny/p/8901100.html
https://blog.csdn.net/yup1212/article/details/80047326
更新pip之后,Pycharm安装package出现报错:module 'pip' has no attribute 'main'

找到安装目录下 helpers/packaging_tool.py文件,找到如下代码:

def do_install(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip.main(['install'] + pkgs)

def do_uninstall(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip.main(['uninstall', '-y'] + pkgs)

修改为如下,保存即可。

def do_install(pkgs):
try:

import pip

    try:
        from pip._internal import main
    except Exception:
        from pip import main
except ImportError:
    error_no_pip()
return main(['install'] + pkgs)

def do_uninstall(pkgs):
try:

import pip

    try:
        from pip._internal import main
    except Exception:
        from pip import main
except ImportError:
    error_no_pip()
return main(['uninstall', '-y'] + pkgs)

可能性解决方法二:
在控制台输入pip,根据提示安装,如果还是报版本的错误,建议根据提示,先卸载,再安装相应的版本
pip install --user nltk