1.升级pip报到新的版本从9到18--升级setuptool 此时出现没有main 的错误,
2.修改pyCharm程序下helps/packaging_tool.py
修改 do_install 出的代码;
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 pip.main(['install'] + pkgs)
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 pip.main(['uninstall', '-y'] + pkgs)
return main(['uninstall', '-y'] + pkgs)
3.升级setuptool 发现可以找到了,升级