代码之家  ›  专栏  ›  技术社区  ›  clstaudt

自制python升级中断已安装的python工具

  •  3
  • clstaudt  · 技术社区  · 6 年前

    我使用自制程序和pip来管理我的Python安装。最近的 brew upgrade 似乎破坏了Python shell命令,例如 pip , ipython jupyter .

     !  ~/ jupyter                                                                                                                                                                                                                                                                                                                                                                                          Sat Oct 27 14:06:46 2018
    Failed to execute process '/usr/local/bin/jupyter'. Reason:
    The file '/usr/local/bin/jupyter' specified the interpreter '/usr/local/opt/python3/bin/python3.6', which is not an executable command.
    

    而且 本来应该升级到Python 3.7,现在已经在系统上了,但是命令 python3

    我的直觉是重新开始安装所有Python。你能建议一种方法吗(特别是现在 坏了吗?

    brew reinstall jupyter 不解决此问题,并产生:

    ==> Installing jupyter
    ==> Downloading https://homebrew.bintray.com/bottles/jupyter-1.0.0_5.high_sierra.bottle.1.tar.gz
    ==> Downloading from https://akamai.bintray.com/35/357e40d51326385dda5eed4cef3fbb3640d3955ba8010145ca45459529231114?__gda__=exp=1540644375~hmac=049a5af67ac32cab5a66ad1346299fae0f82d746bd3e9b447d9a21a268e96ad0&response-content-disposition=attachment%3Bfilename%3D%22jupyter-1.0.0_5.high_sierra.bottle.1.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1_OrYeCyc0sGgKRw0sOPJEjC3dAXrj6v6YoPm3azxR3Et6paTgqR
    ######################################################################## 100.0%
    ==> Pouring jupyter-1.0.0_5.high_sierra.bottle.1.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/jupyter
    Target /usr/local/bin/jupyter
    already exists. You may want to remove it:
      rm '/usr/local/bin/jupyter'
    
    To force the link and overwrite all conflicting files:
      brew link --overwrite jupyter
    
    To list all files that would be deleted:
      brew link --overwrite --dry-run jupyter
    
    Possible conflicting files are:
    /usr/local/bin/jupyter
    /usr/local/bin/jupyter-console
    /usr/local/bin/jupyter-kernel
    /usr/local/bin/jupyter-kernelspec
    /usr/local/bin/jupyter-migrate
    /usr/local/bin/jupyter-nbconvert
    /usr/local/bin/jupyter-run
    /usr/local/bin/jupyter-troubleshoot
    /usr/local/bin/jupyter-trust
    
    0 回复  |  直到 6 年前