Comments (10)
I don't know about scikit-learn, so I can only try to guess. If it is a Python library, it should Just Workβ’ given
- You have Conda in your REQUIRE file (easy)
- You have a way to reach the python library from Julia. That may need PyCall, and making sure PyCall is using Conda's provided Python (harder)
from conda.jl.
That may need PyCall, and making sure PyCall is using Conda's provided Python (harder)
So far my README has been saying "install conda", then "conda install scikit-learn" and AFAIK that works, PyCall is able to import it. Is there an additional difficulty with Conda.jl
? What happens if full-conda was already installed, does Conda.jl's miniconda just add another PATH
for Python to find libraries?
from conda.jl.
I do not know how PyCall search for Python library, but it looked like PyCall worked with only one Python installation, either the system one or a conda one. Maybe @stevengj can help us here. But if PyCall uses the system Python, I do not see how it could find the conda installed packages.
What happens if full-conda was already installed, does Conda.jl's miniconda just add another PATH for Python to find libraries?
No, Conda.jl always uses it's own miniconda installation. This make it easier to work with and guarantee a coherent state.
from conda.jl.
PyCall can use either the Conda Python, or some other Python installation (e.g. a system-wide Anaconda distro installation), but not both simultaneously.
I would do something similar to how PyPlot checks for matplotlib: install it via Conda if possible, or suggest that the user reconfigure PyCall to use Conda: https://github.com/stevengj/PyPlot.jl/blob/2dcaebfd4e207367dedd88712ec06ddd270e4573/src/PyPlot.jl#L239-L256
I should probably just add a function to PyCall like PyCall.pyrequire(module, condapkg)
that does this, since several packages seem to use this kind of functionality.
from conda.jl.
I should probably just add a function to PyCall like PyCall.pyrequire(module, condapkg) that does this, since several packages seem to use this kind of functionality.
Python version aside, it should be as easy as adding an entry to sys.path
to be able to import packages from both the system installation, and a Conda.jl provided installation.
from conda.jl.
@stevengj Thanks for that code snippet, I'll try it out.
On Sun, May 15, 2016 at 10:25 AM, Steven G. Johnson <
[email protected]> wrote:
PyCall can use either the Conda Python, or some other Python
installation (e.g. a system-wide Anaconda distro installation), but not
both simultaneously.I would do something similar to how PyPlot checks for matplotlib: install
it via Conda if possible, or suggest that the user reconfigure PyCall to
use Conda:
https://github.com/stevengj/PyPlot.jl/blob/2dcaebfd4e207367dedd88712ec06ddd270e4573/src/PyPlot.jl#L239-L256I should probably just add a function to PyCall like PyCall.pyrequire(module,
condapkg) that does this, since several packages seem to use this kind of
functionality.β
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#32 (comment)
from conda.jl.
With PyCall 1.5 (shortly to be tagged), you can now do pyimport_conda("sklearn", "scikit-learn")
and it will import sklearn
, auto-installing with Conda if PyCall is configured to use Conda, and printing an error message explaining how to switch to Conda if not.
from conda.jl.
π
from conda.jl.
@cstjean does that fix the issue for you?
from conda.jl.
Well, it's rather hard to test these things, but presumably yes. I haven't checked if it works on travis yet, I assume that I can now remove
before_install:
#install scikit-learn to test functionallity
- julia -e 'Pkg.add("Conda")'
- julia -e 'using Conda; Conda.add("scikit-learn")'
and rely on Steven's new function to install it automatically. I'll reopen if I get a problem. Thanks for your help!
from conda.jl.
Related Issues (20)
- Conda in Julia create new Environment inside an Environment directory, how to change it?
- libstdc++.so.6: version `GLIBCXX_3.4.30' not found HOT 1
- GLIBCXX version problem with scipy.optimize on Linux HOT 4
- Reproducible segmentation fault during build on linux/arm64 HOT 7
- Failing to install matplotlib on gh actions HOT 3
- Failing to install miniconda on Windows HOT 2
- PyCall is not using the packages in Conda HOT 1
- how to correctly set the proxy in `.condarc` file HOT 1
- Installation error with Julia 1.9.0 HOT 2
- error on conda package imports HOT 1
- ResolvePackageNotFound: - conda==23.1.0 HOT 4
- CondaValueError: You have chosen a non-default solver backend (libmamba) but it was not recognized. Choose one of: classic HOT 6
- disable auto_update_conda?: conflict conda versions when installing RCall.jl and PyCall.jl HOT 3
- satified_skip_solve in the latest version doesn't work on x86 Github CI
- Error installing RISE plugin from Conda HOT 6
- `Conda.exists(::AbstractString)` errors
- Julia v1.10-rc1: Conda.jl does not build when `startup.jl` loads packages HOT 1
- Use scratchspaces rather than .julia/conda HOT 4
- Segmentation Fault 11 when starting Jupyter from IJulia & miniconda on MacOS
- Conda installation leaves tmp/installer.sh behind HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conda.jl.