当sudo安装python 3.5时忽略ensurepip失败

时间:2017-10-10 12:10:35

标签: python linux python-3.x raspberry-pi pip

因此,围绕stackoverflow存在大量同样的问题,但没有一个解决方案对我有用。我在我的覆盆子pi 3B上使用raspbian来安装python 3.5。我已完成以下操作来达到此错误:

安装依赖项:

apt-get install sudo
apt-get install git
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev
sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev
sudo apt-get install libssl-dev openssl
sudo apt-get install build-essential unzip -y
sudo apt-get install software-properties-common -y
sudo apt-get install libopus-dev libffi-dev libsodium-dev

安装python:

cd ~
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar -zxvf Python-3.5.0.tgz
cd Python-3.5.0
./configure
make -j4
sudo make install

在sudo make install上给出了这个失败:

Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS

此外,使用以下命令安装pip:

cd ~
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.5 get-pip.py

我收到此错误:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip
  Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not fetch URL https://www.piwheels.hostedpi.com/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip

根据要求提供最后20行./configure:

checking whether POSIX semaphores are enabled... yes
checking for broken sem_getvalue... no
checking digit size for Python's longs... no value specified
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking size of wchar_t... 4
checking for UCS-4 tcl... no
checking whether wchar_t is signed... no
yes
checking whether byte ordering is bigendian... no
checking ABIFLAGS... m
checking SOABI... cpython-35m-arm-linux-gnueabihf
checking LDVERSION... $(VERSION)$(ABIFLAGS)
checking whether right shift extends the sign bit... yes
checking for getc_unlocked() and friends... yes
checking how to link readline libs... -lreadline
checking for rl_callback_handler_install in -lreadline... yes
checking for rl_pre_input_hook in -lreadline... yes
checking for rl_completion_display_matches_hook in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking for append_history in -lreadline... yes
checking for broken nice()... no
checking for broken poll()... no
checking for struct tm.tm_zone... (cached) yes
checking for working tzset()... yes
checking for tv_nsec in struct stat... yes
checking for tv_nsec2 in struct stat... no
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for term.h... yes
checking whether mvwdelch is an expression... yes
checking whether WINDOW has _flags... yes
checking for is_term_resized... yes
checking for resize_term... yes
checking for resizeterm... yes
configure: checking for device files
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for %lld and %llu printf() format support... yes
checking for %zd printf() format support... yes
checking for socklen_t... yes
checking for broken mbstowcs... no
checking for --with-computed-gotos... no value specified
checking whether gcc -pthread supports computed gotos... yes
checking for build directories... done
checking for -O2... yes
checking for glibc _FORTIFY_SOURCE/memmove bug... no
checking for stdatomic.h... yes
checking for GCC >= 4.7 __atomic builtins... yes
checking for ensurepip... upgrade
checking if the dirent structure of a d_type field... yes
checking for the Linux getrandom() syscall... yes
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating Misc/python.pc
config.status: creating Misc/python-config.sh
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
config.status: pyconfig.h is unchanged
creating Modules/Setup
creating Modules/Setup.local
creating Makefile

TLDR:安装了ssl的所有依赖项,但它并没有在我的覆盆子pi 3B上使用rasbian。

0 个答案:

没有答案