JuliaPy / JuliaPy/PyCall.jl

Can't `@pyimport ssl`

Đang mở
#331 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
1.5k
Fork
186
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.