小编Dot*_*ght的帖子

Pyenv,Python安装失败:未安装OpenSSL开发标头

我一直无法使用Pyenv在macOS(10.13.6)上安装Python,并已就常见的构建问题用尽了所有建议。

pyenv-doctor报告:未安装OpenSSL开发标头。如各种相关GitHub问题中所述,重新安装OpenSSL无效,没有各种标志设置,例如(以各种组合):

export CFLAGS="-I$(brew --prefix openssl)/include"
export CPPFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig/"
export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)

(在命令行中也尝试了这些。)

(通过Homebrew尝试了OpenSSL 1.02p和1.1)

试过了

brew install readline xz
Run Code Online (Sandbox Code Playgroud)

$ CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install 3.6.6
Run Code Online (Sandbox Code Playgroud)

$ CFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install 3.6.6
Run Code Online (Sandbox Code Playgroud)

xcode-select --install
(or via downloadable command line tools installer for reinstallation)
Run Code Online (Sandbox Code Playgroud)

没运气。

brew link --force openssl
Run Code Online (Sandbox Code Playgroud)

不允许(错误消息说使用标志)。

还尝试了:

$(brew --prefix)/opt/openssl/bin/openssl
Run Code Online (Sandbox Code Playgroud)

并在此处尝试了OpenSSL / macOS建议:

https://solitum.net/openssl-os-x-el-capitan-and-brew/
Run Code Online (Sandbox Code Playgroud)

$ PATH显示:

/usr/local/opt/openssl/bin:/Users/tc/google-cloud-sdk/bin:/Users/tc/Code/git/flutter/bin:/usr/local/sbin:/usr/local/heroku/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/tc/google-cloud-sdk/bin:/Users/tc/Code/git/flutter/bin:/usr/local/sbin:/usr/local/heroku/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/tc/google-cloud-sdk/bin:/Users/tc/.nvm/versions/node/v8.11.3/bin:/Users/tomclaburn/Code/git/flutter/bin:/usr/local/sbin:/usr/local/heroku/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/mongodb/bin:/usr/local/opt/openssl/bin/openssl:/usr/local/mongodb/bin:/usr/local/mongodb/bin
Run Code Online (Sandbox Code Playgroud)

.bash_profile包含:

if [ -d …
Run Code Online (Sandbox Code Playgroud)

python macos openssl pyenv

3
推荐指数
1
解决办法
1177
查看次数

创建一系列承诺

我无法理解如何将单个Promise调整为一系列Promise,一旦两个API调用都返回,它就会解析.

如何将下面的代码重写为Promises链?

function parseTweet(tweet) {  
  indico.sentimentHQ(tweet)
  .then(function(res) {
     tweetObj.sentiment = res;
     }).catch(function(err) {
    console.warn(err);
  });

  indico.organizations(tweet)
  .then(function(res) {
     tweetObj.organization = res[0].text;
     tweetObj.confidence = res[0].confidence;
     }).catch(function(err) {
    console.warn(err);
  });
}
Run Code Online (Sandbox Code Playgroud)

谢谢.

javascript node.js

2
推荐指数
1
解决办法
89
查看次数

标签 统计

javascript ×1

macos ×1

node.js ×1

openssl ×1

pyenv ×1

python ×1