Python error - “ImportError: cannot import name 'dist'”

前端 未结 5 638
遥遥无期
遥遥无期 2021-01-03 20:19

I\'m on Ubuntu 16.04, and I get:

Traceback (most recent call last):
  File \"/home/omermazig/.virtualenvs/fixi/bin/pip\", line 7, in 
    from          


        
5条回答
  •  無奈伤痛
    2021-01-03 20:54

    Take a loot at this (similar problem): https://github.com/pypa/pip/issues/5367

    Possible fix:

    • Download Python source from https://www.python.org/
    • Decompress the source code
    • Install the following dependencies:

      sudo apt-get install zlib1g-dev (needed to compile Python)

    • and install:

    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev (needed by Pip to make SSL requests)

    • Compile and install Python:

    /configure

    make

    make install

    • Python 3.6 with Pip should be installed.

    Full credit to jonbesga.

提交回复
热议问题