Anaconda prompt loading error: The input line is too long

前端 未结 3 1105
陌清茗
陌清茗 2021-02-06 13:05

I installed Anaconda 64 python 2.7 on Windows 7 64-bit version. After installation, the anaconda prompt can start with no problem. But whenever I restart/shutdown and restart th

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 13:44

    I had the same problem, it also occurs with activating environments created with conda. Because I was annoyed for a long time by problems from a messy Windows PATH, my solution was to create a little python tool to declutter the PATH variable. It is available via a

    >pip install pywinpath
    

    followed by

    >pywinpath
    

    Or you can copy & paste the source code from the single file https://github.com/czamb/pywinpath/blob/master/pywinpath.py

    Or download the bundled .exe from https://github.com/czamb/pywinpath/releases

    Then after you PATH fits inside the Windows length restrictions, you can add Anaconda's entries at the beginning of your user or system PATH. The relevant entries can be found by calling the Anaconda Promt and entering echo %PATH%, they are the first three entries.

    There are also other tools to edit the Windows PATH variable: https://superuser.com/questions/297947/is-there-a-convenient-way-to-edit-path-in-windows-7

提交回复
热议问题