Giter Site home page Giter Site logo

Comments (10)

vishcodex avatar vishcodex commented on September 26, 2024 1

thanks a lot @jackos for your prompt response in resolving this issue.

image

from mojo.

vishcodex avatar vishcodex commented on September 26, 2024

As shown on the screenshot, I see the modules installed, Still I am facing the issue. Thank You!

from mojo.

jackos avatar jackos commented on September 26, 2024

Hi @vishcodex can you please show me the output of running this with Mojo:

from python import Python
from os.env import getenv


def main():
    var pre_init_lib = getenv("MOJO_PYTHON_LIBRARY")
    if pre_init_lib:
        print("\npython_lib:", pre_init_lib, end="\n\n")
    sys = Python.import_module("sys")
    print("----module-paths----")
    for p in sys.path:
        print(p)
    print("\npython_lib:", getenv("MOJO_PYTHON_LIBRARY"))
    print("python_exe:", getenv("PYTHONEXECUTABLE"))

from mojo.

jackos avatar jackos commented on September 26, 2024

And also the output of this command: mojo --version

from mojo.

vishcodex avatar vishcodex commented on September 26, 2024

Hi @jackos , Please find the output :-)

image

from mojo.

jackos avatar jackos commented on September 26, 2024

It looks like the conda environment isn't active, can you do:

/Users/AF82152/anaconda3/bin/conda init --all

Then restart your shell and do:

conda activate mojo

And try running again?

from mojo.

vishcodex avatar vishcodex commented on September 26, 2024

Yes @jackos , I have done it twice. Please find the screenshot.

image

from mojo.

jackos avatar jackos commented on September 26, 2024

What is the output when you run the command:

which -a python3

from mojo.

vishcodex avatar vishcodex commented on September 26, 2024

Please find below

image

from mojo.

jackos avatar jackos commented on September 26, 2024

Yes your conda environment should go to the top of PATH when you activate it, but here you have /opt/homebrew/bin/python3 twice ahead of it. Try these until one of them fixes it:

  • Restart your shell and activate again with conda activate mojo
  • Check your ~/.zshrc or ~/.bashrc (whichever shell you're using) and make sure the conda activation script is at the end
  • Remove anaconda3 with rm -r ~/anaconda3 (and delete the script out of your shell activation script) and install miniconda3 instead: https://docs.anaconda.com/free/miniconda/#quick-command-line-install

One of those should fix it, if nothing works you can explicitly add it to the top of your PATH:

  • Explicitly add the path at the end of your startup script:
export PATH="~/anaconda3/envs/mojo/bin:$PATH"

from mojo.

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.