Giter Club home page Giter Club logo

Comments (4)

stevengj avatar stevengj commented on June 5, 2024 1

Changing if use_conda to if use_conda && !success(`$python -c "import numpy"`) seems reasonable enough if you want to try it out and maybe submit a PR.

from pycall.jl.

stevengj avatar stevengj commented on June 5, 2024

The problem is that we can't call PyCall functions (e.g. PyCall.pyexists("numpy")) in the build script.

I suppose we could check success(`$python -c "import numpy"`).

But in the circumstance you describe, shouldn't you just build PyCall with ENV["PYTHON"] = "/path/to/your/python" to tell it to use your manual offline Python installation rather than trying to install via Conda?

from pycall.jl.

callous4567 avatar callous4567 commented on June 5, 2024

The problem is that we can't call PyCall functions (e.g. PyCall.pyexists("numpy")) in the build script.

I suppose we could check success(`$python -c "import numpy"`).

But in the circumstance you describe, shouldn't you just build PyCall with ENV["PYTHON"] = "/path/to/your/python" to tell it to use your manual offline Python installation rather than trying to install via Conda?

I do actually have to set ENV["PYTHON"]=... when I transfer to the work VM- otherwise Julia defaults to trying to use the one in /usr/bin/... (despite being tarballed with the ENV set to the Conda interpreter.) The issue still occurred when doing this. After looking at the build.jl file, I've found the reason that this is a problem- the Python I'm using is the one that Conda comes with- this line

use_conda = dirname(python) == abspath(Conda.PYTHONDIR)

triggers the check for numpy that ruins the build process in the offline build. The manual offline Python installation I'm using is actually just the one that Conda builds up (``/home/username/.julia/conda/3/x86_64/bin) and this triggers the statement above to be true, ruining the build as Conda tries to connect to internet it has no access to.

So, to sum up- the issue here is that the manual offline installation I'm using is one that I made using Conda when it was connected to the net- taking it offline and then trying to build it will result in a fail, as Conda can no longer do all the online versioning it normally does when you call a Conda.add().

It's a very niche issue for sure- I doubt there's many people building environments to later use offline without network access, nevermind with the default Conda interpreter, so I can understand if there's nothing to be done about it- I just hope if someone else encounters it they somehow find this post.

from pycall.jl.

callous4567 avatar callous4567 commented on June 5, 2024

Aye- I'll take a look into doing this at some point in the near future :)

from pycall.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.