Git Product home page Git Product logo

Comments (4)

stevengj avatar stevengj commented on June 18, 2024

If you omit the -l option, it doesn't read the .profile file. This is the whole point of running which python under bash: software like Anaconda installs Python under a new directory that is only added to the PATH in ~/.profile.

from pycall.jl.

celestrist avatar celestrist commented on June 18, 2024

I agree that the whole point of adding the -l option is to read the .profile file.
Suppose that I have both Enthought and Anaconda distribution installed in my machine and I have to switch between them. Choosing the default python by reading the .profile file will need me to edit my .profile file every time I want PyCall to pick up different version of python. Omitting the -l option enable PyCall to pick up whichever python that is in my PATH now.

Unless you are not using Julia in a shell, the current active PATH will point to whatever python distribution you are using, including the directory Anaconda Python live in. My point is that why read the PATH from the .profile file? Why not the current active PATH since we can change it easily?

Sorry if I miss some obvious point and thanks for taking time to response :)

from pycall.jl.

stevengj avatar stevengj commented on June 18, 2024

The problem is that a lot of people don't run Julia from a shell in MacOS, they run Julia from a prepackaged binary, and with a prepackaged binary of Python like Anaconda. If we don't read the PATH in ~/.profile, it is very hard for those users to figure out how to tell Julia to find the right Python version. (See also JuliaLang/IJulia.jl#67)

from pycall.jl.

stevengj avatar stevengj commented on June 18, 2024

I should add that the right solution here is for the prepackaged Mac Julia binaries to source ~/.profile to get the user's PATH. That way I can go back go using just python and things will work, with no need for bash -lc 'which python' hackery.

But that's a bug report that should be filed against Julia, not here; please comment at JuliaLang/julia#4222, for example.

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.