Closed ablaom closed 4 years ago
function import_sklearn()
global import_already_warned
mod = PyCall.pyimport_conda("sklearn", "scikit-learn")
version = VersionNumber(mod.__version__)
VersionNumber
is a base function. Apparently 0.22.2post
isn't valid according to julia's semver interpretation. I'm assuming that this post
is a bit like a prerelease? Then I don't think we should modify the code, but if you want to use bypass the check, I'd recommend just redefining the function interactively to:
ScikitLearn.Skcore.import_sklearn() = PyCall.pyimport_conda("sklearn", "scikit-learn")
In general you cannot expect non-Julia packages to follow the semver spec for version numbers. To parse version numbers of Python packages, use the https://github.com/stevengj/VersionParsing.jl package.
@ablaom i'll close this now
You're still not using VersionParsing, so this doesn't seem resolved?
Not sure if this is a ScikitLearn or PyCall problem, but I'm having problems using this "post1" version of scikit-learn: