“ssl module in Python is not available” when installing package with pip3

后端 未结 28 1890
别跟我提以往
别跟我提以往 2020-11-22 08:51

I\'ve install Python 3.4 and Python 3.6 on my local machine successfully, but am unable to install packages with pip3.

When I execute pip3 install

28条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 09:22

    Step by step guide to install Python 3.6 and pip3 in Ubuntu

    1. Install the necessary packages for Python and ssl: $ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

    2. Download and unzip "Python-3.6.8.tar.xz" from https://www.python.org/ftp/python/ into your home directory.

    3. Open terminal in that directory and run: $ ./configure

    4. Build and install: $ make && sudo make install

    5. Install packages with: $ pip3 install package_name

    Disclaimer: The above commands are not tested in Ubuntu 20.04 LTS.

提交回复
热议问题