JuliaPy / JuliaPy/PyCall.jl

Can't `@pyimport ssl`

未关闭
#331 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Julia
星标
1.5k
派生
186
PR 合并指标
30 天内没有已合并 PR

描述

Fresh install of `PyCall` with `ENV[PYTHON]=""`.

```
julia> using PyCall
INFO: Recompiling stale cache file /home/ubuntu/.julia/lib/v0.5/PyCall.ji for module PyCall.
julia> @pyimport ssl
ERROR: PyError (:PyImport_ImportModule)
ImportError('/home/ubuntu/.julia/v0.5/Conda/deps/usr/lib/python2.7/lib-dynload/_ssl.so: undefined symbol: SSLv2_method',)
File "/home/ubuntu/.julia/v0.5/Conda/deps/usr/lib/python2.7/ssl.py", line 97, in
import _ssl # if we can't import it, let the error propagate

in pyerr_check at /home/ubuntu/.julia/v0.5/PyCall/src/exception.jl:56 [inlined]
in pyerr_check at /home/ubuntu/.julia/v0.5/PyCall/src/exception.jl:61 [inlined]
in macro expansion at /home/ubuntu/.julia/v0.5/PyCall/src/exception.jl:81 [inlined]
in pyimport(::String) at /home/ubuntu/.julia/v0.5/PyCall/src/PyCall.jl:387

```

By the conda python works fine:

```
bash> ~/.julia/v0.5/Conda/deps/usr/bin/python -c 'import ssl; print(ssl.__file__)'
/home/ubuntu/.julia/v0.5/Conda/deps/usr/lib/python2.7/ssl.pyc
```

I know there is a resolution to this, because I have dealt with it before, several times.
But I can not recall what it is.

It is environment dependent.
Because I know this does not occur on Travis

My short term solution, which seems to work, is to just use the system python.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。