标签:dfa col mod put cep code NPU parse pkg
AttributeError Traceback (most recent call last) <ipython-input-5-880e5dfa627c> in <module> 1 def install(package): 2 pip.main(["install", package]) ----> 3 install("syslog_parse") <ipython-input-5-880e5dfa627c> in install(package) 1 def install(package): ----> 2 pip.main(["install", package]) 3 install("syslog_parse") AttributeError: module ‘pip‘ has no attribute ‘main‘
def install(package): pip.main(["install", package]) def uninstall(package): pip.main(["uninstall -y", package])
def install(pkg): try: from pip._internal import main except Exception: from pip import main return main(["install", pkg]) def uninstall(pkg): try: from pip._internal import main except Exception: from pip import main return main(["uninstall -y", pkg])
Jupiter 页面环境下使用pip无法安装(AttributeError: module 'pip' has no attribute 'main')
标签:dfa col mod put cep code NPU parse pkg
原文地址:https://www.cnblogs.com/spaceapp/p/11528774.html