Error running hello world using pixi shell in cursor

Hello .. I just installed Mojo with Pixi on my Windows system using WSL. I’m editing my Mojo code with Cursor + Mojo Vscode extension (nightly) and Remote Development (OpenSSH).

When I run a Mojo hello world program, it works without any issues.

But as soon as I start a pixi shell, I get some unclear error messages to me :slight_smile:

Running mojo in terminal works without error.

Complete error

/home/cyrill/.cursor-server/data/User/globalStorage/modular-mojotools.vscode-mojo-nightly/magic-data-home/envs/max/bin/mojo run /home/cyrill/mojo-playground/mojo-playground/hello.🔥
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x1" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x2" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x2" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x5" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: unit
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x1" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"group`9" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: unit
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x6" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: unit
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"idx`7" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"idx`2x1" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x11" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x1" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x2" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`1" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`5" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`8" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`4" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x5" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"_`2x8" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x5" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`21" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x2" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x3" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`2x1" : !lit.struct<@stdlib::@builtin::@int::@Int>>
/home/cyrill/mojo-playground/.pixi/envs/default/lib/mojo/stdlib.mojopkg:0:0: error: expected mlir::TypedAttr, but got: #kgen<param.decl *"i`7" : !lit.struct<@stdlib::@builtin::@int::@Int>>
[430243:430243:20250707,112852.153754:ERROR elf_dynamic_array_reader.h:64] tag not found
[430243:430243:20250707,112852.158152:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[430243:430243:20250707,112852.158256:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Please submit a bug report to https://github.com/modular/modular/issues and include the crash backtrace along with all the relevant source codes.
Stack dump:
0.      Program arguments: /home/cyrill/.cursor-server/data/User/globalStorage/modular-mojotools.vscode-mojo-nightly/magic-data-home/envs/max/bin/mojo run /home/cyrill/mojo-playground/mojo-playground/hello.\360\237\224\245
 #0 0x00005ef23b19e95b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) Signals.cpp:0:0
 #1 0x00005ef23b19c72b llvm::sys::RunSignalHandlers() Signals.cpp:0:0
 #2 0x00005ef23b19f00a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007726bb445330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x00007726bb49eb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
 #5 0x00007726bb44527e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
 #6 0x00007726bd7b4142 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #7 0x00007726bb445330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #8 0x00005ef23893b92f void llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>::callback_fn<mlir::bytecode::detail::IRNumberingState::computeGlobalNumberingState(mlir::Operation*)::$_0>(long, mlir::Operation*, mlir::WalkStage const&) IRNumbering.cpp:0:0
 #9 0x00005ef23b11d65e mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>) Visitors.cpp:0:0
#10 0x00005ef23b11d646 mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>) Visitors.cpp:0:0
#11 0x00005ef23b11d646 mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>) Visitors.cpp:0:0
#12 0x00005ef23b11d646 mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>) Visitors.cpp:0:0
#13 0x00005ef23b11d646 mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>) Visitors.cpp:0:0
#14 0x00005ef23b11d646 mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>) Visitors.cpp:0:0
#15 0x00005ef23b11d646 mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*, mlir::WalkStage const&)>) Visitors.cpp:0:0
#16 0x00005ef23892fcb2 mlir::bytecode::detail::IRNumberingState::IRNumberingState(mlir::Operation*, mlir::BytecodeWriterConfig const&) IRNumbering.cpp:0:0
#17 0x00005ef2389246f2 mlir::writeBytecodeToFile(mlir::Operation*, llvm::raw_ostream&, mlir::BytecodeWriterConfig const&) BytecodeWriter.cpp:0:0
#18 0x00005ef2381cdae0 M::Cache::cachedTransform(mlir::Operation*, M::RCRef<M::Cache::BlobCache<M::Cache::TransformCacheKey>>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function<void (mlir::Operation*)> const&, std::function<void (mlir::Operation*)> const&) CachedTransform.cpp:0:0
#19 0x00005ef237ca5cd7 M::KGEN::KGENCompiler::runKGENPipeline(mlir::ModuleOp, M::TargetInfoAttr, M::RCRef<M::Cache::BlobCache<M::Cache::TransformCacheKey>>, M::AsyncRT::AnyAsyncValueRef, std::function<void (mlir::Operation*)>, std::function<void (mlir::Operation*)>) KGENCompiler.cpp:0:0
#20 0x00005ef237ca5514 M::KGEN::KGENCompiler::runKGENPipeline(mlir::ModuleOp, M::TargetInfoAttr) KGENCompiler.cpp:0:0
#21 0x00005ef237ad5b4a run(M::State const&) mojo-run.cpp:0:0
#22 0x00005ef237ae05f3 main mojo.cpp:0:0
#23 0x00007726bb42a1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
#24 0x00007726bb42a28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
#25 0x00005ef237ab2965 _start (/home/cyrill/.cursor-server/data/User/globalStorage/modular-mojotools.vscode-mojo-nightly/magic-data-home/envs/max/bin/mojo+0x271a965)
mojo crashed!
Please file a bug report.
Segmentation fault (core dumped)

thanks for help

Looks like shell has already been activated. An active shell has (project name) prepended to the line in terminal. To deactivate the shell simply run exit. Note that if you’re not in a shell you’d need to have pixi run mojo code.mojo to run the code and with an activate shell, it’s as usual mojo code.mojo. Hope it’s clear now.