{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaPy/PyCallJLD.jl/issues/6","repository_url":"https://api.github.com/repos/JuliaPy/PyCallJLD.jl","labels_url":"https://api.github.com/repos/JuliaPy/PyCallJLD.jl/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/JuliaPy/PyCallJLD.jl/issues/6/comments","events_url":"https://api.github.com/repos/JuliaPy/PyCallJLD.jl/issues/6/events","html_url":"https://github.com/JuliaPy/PyCallJLD.jl/issues/6","id":311870154,"number":6,"title":"With python 3.6 cPickle cannot be found, instead one have to import pickle","user":{"login":"stakaz","id":998651,"avatar_url":"https://avatars2.githubusercontent.com/u/998651?v=4","gravatar_id":"","url":"https://api.github.com/users/stakaz","html_url":"https://github.com/stakaz","followers_url":"https://api.github.com/users/stakaz/followers","following_url":"https://api.github.com/users/stakaz/following{/other_user}","gists_url":"https://api.github.com/users/stakaz/gists{/gist_id}","starred_url":"https://api.github.com/users/stakaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stakaz/subscriptions","organizations_url":"https://api.github.com/users/stakaz/orgs","repos_url":"https://api.github.com/users/stakaz/repos","events_url":"https://api.github.com/users/stakaz/events{/privacy}","received_events_url":"https://api.github.com/users/stakaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-06T07:16:49Z","updated_at":"2018-04-06T12:32:56Z","closed_at":null,"author_association":"NONE","body":"Hello, I cannot precompile the module when using python 3.6 because it cannot found the `cPickle` module.\r\nHere is the error code:\r\n\r\n```julia\r\nERROR: LoadError: InitError: PyError (ccall(@pysym(:PyImport_ImportModule), PyPtr, (Cstring,), name)) <class 'ModuleNotFoundError'>\r\nModuleNotFoundError(\"No module named 'cPickle'\",)\r\n\r\nStacktrace:\r\n [1] pyerr_check at /home/gluon/.julia/v0.6/PyCall/src/exception.jl:56 [inlined]\r\n [2] pyerr_check at /home/gluon/.julia/v0.6/PyCall/src/exception.jl:61 [inlined]\r\n [3] macro expansion at /home/gluon/.julia/v0.6/PyCall/src/exception.jl:81 [inlined]\r\n [4] pyimport(::String) at /home/gluon/.julia/v0.6/PyCall/src/PyCall.jl:374\r\n [5] __init__() at /home/gluon/.julia/v0.6/PyCallJLD/src/PyCallJLD.jl:11\r\n [6] _include_from_serialized(::String) at ./loading.jl:157\r\n [7] _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:200\r\n [8] _require_search_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:236\r\n [9] _require(::Symbol) at ./loading.jl:441\r\n [10] require(::Symbol) at ./loading.jl:405\r\n [11] include_from_node1(::String) at ./loading.jl:576\r\n [12] include(::String) at ./sysimg.jl:14\r\n [13] anonymous at ./<missing>:2\r\nduring initialization of module PyCallJLD\r\n```\r\n\r\nI have searched across the internet and found that for python 3.x one has to import `pickle` and it will fall down to `cPickle` when possible.\r\nIndeed changing the import function in `PyCallJLD.jl` to `pickle` allows to compile probably. Any Chance to have it in the version installed by `Pkg`? "},"comment":{"url":"https://api.github.com/repos/JuliaPy/PyCallJLD.jl/issues/comments/379239115","html_url":"https://github.com/JuliaPy/PyCallJLD.jl/issues/6#issuecomment-379239115","issue_url":"https://api.github.com/repos/JuliaPy/PyCallJLD.jl/issues/6","id":379239115,"user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars3.githubusercontent.com/u/2913679?v=4","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T12:32:56Z","updated_at":"2018-04-06T12:32:56Z","author_association":"NONE","body":"Note that this logic is [already implemented](https://github.com/JuliaPy/PyCall.jl/blob/55648f27682835cbe886b9c6de39a25ad8c8c1bd/src/serialize.jl) in the PyCall `serialize` function.   You can get the Pickle module with `PyCall.pickle()`.\r\n\r\nRather than calling `pickle` yourself, maybe just call `serialize`?"}}
{"actor":{"display_login":"stevengj"}}