python3.6 ssl erro

时间:2017-01-16 15:07:38

标签: python ssl

在Ubuntu 16.04中,我使用python3.6(pip 9.0.1)安装BeautifulSoup但失败了。错误是:

pip is configured with locations that require TLS/SSL , however the ssl module in Python is not available. 
could not fetch URL https://pypi.python.org

其次,Ubuntu 16.04附带了内置的python2.7,但我想学习Python 3.6。所以我加载它并使用该命令:

./configure
make && make install

结果是在PATH中安装了python 3.5,并安装了BeautifulSoup。我使用make altinstall来完成Python 3.6的安装。真是太奇怪了。

1 个答案:

答案 0 :(得分:1)

./configure之前,您需要安装所有要求。

在您的情况下,libssl-dev库不够。

要使用apt进行安装,请执行以下操作:

# apt install libssl-dev