JuliaPy / JuliaPy/PyCall.jl

Can't `@pyimport ssl`

Ouverte
#331 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Julia
Étoiles
1.5k
Forks
186
Métriques de merge des PR
Aucune PR mergée en 30 j

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.