JuliaPy / JuliaPy/PyCall.jl

Can't `@pyimport ssl`

Open
#331 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
1.5k
Forks
186
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.