Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Python import not working - Linux|Conda #3259

Closed
Levinin opened this issue Jul 16, 2024 · 2 comments
Closed

[BUG] Python import not working - Linux|Conda #3259

Levinin opened this issue Jul 16, 2024 · 2 comments
Labels
bug Something isn't working mojo-python-interop mojo-repo Tag all issues with this label

Comments

@Levinin
Copy link

Levinin commented Jul 16, 2024

Bug description

Trying to import with Python package fails.
I'm running on Linux with Conda, running the python interpreter find script from the website finds the correct environment at the top of the list. The code compiles but segfaults. Running with mojo gives the following. As you can see, I have cut this back to the very minimum that fails. Mojo only code compiles and runs correctly.

Steps to reproduce

Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes.
Stack dump:
0. Program arguments: mojo try.mojo
#0 0x000055cd7dd41438 (/home/u/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x12a1438)
#1 0x000055cd7dd3f25e (/home/u/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x129f25e)
#2 0x000055cd7dd41acd (/home/u/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x12a1acd)
#3 0x000071972dc42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
mojo crashed!
Please file a bug report.
Segmentation fault (core dumped)

from python import Python
fn main() raises:
    Python.add_to_path(".")

Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes.
Stack dump:
0. Program arguments: mojo try.mojo
#0 0x00005c84e1d93438 (/home/u/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x12a1438)
#1 0x00005c84e1d9125e (/home/u/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x129f25e)
#2 0x00005c84e1d93acd (/home/u/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x12a1acd)
#3 0x00007a8dc8e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
mojo crashed!
Please file a bug report.
Segmentation fault (core dumped)

from python import Python
fn main() raises:
    var pd = Python.import_module("pandas")

System information

Linux Ubuntu 22.04
Conda environment
mojo 24.4.0 (2cb57382)
modular 0.8.0 (39a426b5)
@Levinin Levinin added bug Something isn't working mojo-repo Tag all issues with this label labels Jul 16, 2024
Copy link
Collaborator

Hi there, did you follow the instructions here or somewhere else? https://docs.modular.com/mojo/manual/python/#set-up-a-python-environment-with-conda. What version of Python are you using?

@hogepodge
Copy link
Collaborator

Since we haven't received any feedback on this issue and can't reproduce it, I'm going to close it. Please feel free to re-open if you're still running in to it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo-python-interop mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

3 participants