我尝试使用以下命令进行安装 “ pyenv安装3.7.0” 并得到如下错误
Downloading Python-3.7.0.tar.xz...
-> https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
Installing Python-3.7.0...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (Ubuntu 14.04 using python-build 20180424)
我已经检查了https://github.com/pyenv/pyenv/wiki/Common-build-problems的解决方案,并尝试了
CFLAGS=-I/usr/include/openssl \
LDFLAGS=-L/usr/lib64 \
pyenv install -v 3.7.0
再次遇到与
相同的错误The Python ssl extension was not compiled. Missing the OpenSSL lib?
还尝试安装低于3.7的python版本,所有版本均已安装,没有错误。我在这里没有任何依赖的软件包或版本更新吗? 我有openssl版本
OpenSSL 1.0.1f 6 Jan 2014
答案 0 :(得分:7)
您可以先通过命令安装openssl@1.1来安装相同的文件
brew install 'openssl@1.1'
您可以使用以下命令安装python3.7:
CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl@1.1)" pyenv install 3.7.0
或者如果您不想为openssl安装任何特定版本,则可以将以下命令用于openssl软件包。
CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)" pyenv install 3.7.0
答案 1 :(得分:2)
这里是否缺少任何相关的软件包或版本更新。
是的,很不幸。 Python 3.7.0需要OpenSSL 1.0.2。我找不到比开发邮件列表更好的来源。到目前为止,在Ubuntu 14.04上运行Python 3.7.0一直没有成功,因为安装正确版本的OpenSSL且没有冲突是一个窍门。
Python 3.7:要求OpenSSL> = 1.0.2
https://mail.python.org/pipermail/python-dev/2018-January/151718.html
答案 2 :(得分:-1)
此方法适用于Mac
$rootofcfiles = @(Get-ChildItem -Path c:\ -Name -Exclude
windows,users,temp,programdata,autodesk,amd,intel,apps,"common
templates","program files (x86)","program files", perflogs,est,drivers,recovery,*.ini,*.cab,*.msi)
foreach ($Folder in $rootofcfiles)
{
# retrieve all *.txt files in $Folder
#$TxtFiles = Get-ChildItem -Path $Folder -Include '*'
# get the file count
#$FilesInFolder = $TxtFiles.Count
# calculate folder size
$FolderSize = ($TxtFiles | Measure -Sum Length).Sum
# write folder size to host
$FolderSizeMB = $FolderSize / 1GB
Write-Host "$Folder is $FolderSizeMB GB in size"
}