在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的安装。真是太奇怪了。
答案 0 :(得分:1)
在./configure
之前,您需要安装所有要求。
在您的情况下,libssl-dev
库不够。
要使用apt
进行安装,请执行以下操作:
# apt install libssl-dev