首页 > 其他 > 详细

解决pycharm问题:module 'pip' has no attribute 'main'

时间:2019-08-31 15:20:20      阅读:68      评论:0      收藏:0      [点我收藏+]
找到pycharm安装目录下 helpers/packaging_tool.py文件

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)

解决pycharm问题:module 'pip' has no attribute 'main'

原文:https://www.cnblogs.com/zsfishman/p/11438637.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!