# Require failed to create a usable precompiled cached file

**URL:** <https://discourse.julialang.org/t/require-failed-to-create-a-usable-precompiled-cached-file/4548>\
**Category:** General Usage\
**Created:** [June 29, 2017, 6:33pm UTC](https://discourse.julialang.org/t/require-failed-to-create-a-usable-precompiled-cached-file/4548 "2017-06-29T18:33:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [June 29, 2017, 6:33pm UTC](https://discourse.julialang.org/t/require-failed-to-create-a-usable-precompiled-cached-file/4548/1 "2017-06-29T18:33:36Z")

</div>

During the 0.6 alpha process, it seemed that every time I downloaded a new Julia version, `using ScikitLearn` would fail with the error: `Module ScikitLearn declares precompile(true) but require failed to create a usable precompiled cache file.` Restarting the Julia session always fixed the problem, but it seems to affect [other users](https://github.com/cstjean/ScikitLearn.jl/issues/30) too. Is there anything I (as the package author) can do about it? Anyone else has encountered this?

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [June 29, 2017, 8:15pm UTC](https://discourse.julialang.org/t/require-failed-to-create-a-usable-precompiled-cached-file/4548/2 "2017-06-29T20:15:24Z")

</div>

I suspect you probably know all about this, but there are some subtleties when precompiling modules that import Python code (since those imports have to happen when the module is actually loaded, not at precompile time). Where in SciKitLearn does the call to import the Python modules actually happen? (I poked around in the code but couldn’t figure that out easily).

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [June 29, 2017, 10:01pm UTC](https://discourse.julialang.org/t/require-failed-to-create-a-usable-precompiled-cached-file/4548/3 "2017-06-29T22:01:50Z")

</div>

ScikitLearn.jl is Python-free by default; it installs and loads the Python `scikit-learn` library only when requested by the user via `@sk_import`. But that’s a good point, there is some left-over PyCall code that should be updated.
