Installing pip using easy_install

后端 未结 6 1723
刺人心
刺人心 2020-12-10 00:42

I don\'t have root access and i want to install python from scratch. So I downloaded the python source code and compiled it. Next I wanted to install pip. But w

6条回答
  •  盖世英雄少女心
    2020-12-10 01:35

    For those who have no root access, here is how I solved the issue.

    1. Download Python (Gzipped source tarball).

    2. Unzip and cd to the Python source directory.

    3. Configure with the "--with-ensurepip=install" flag, e.g.,

      ./configure --prefix=[your-specified-dir] --with-zlib-dir=/usr/lib64 --with-ensurepip=install
      
    4. make & make install

    5. Now you should have a working but out-dated pip. To get the latest pip, download the get-pip.py file and run python get-pip.py

    Now you should have the latest pip. Enjoy. :)

提交回复
热议问题