The Mojo Dojo
Project description
The Mojo Dojo
1. Install LLVM
sudo apt install llvm
echo 'export LLVM_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer' >> ~/.bashrc
2. Find libpython path for your env
Assuming env located at ~/miniconda3
python3 -c 'import pathlib; sorted({print(x) for x in (pathlib.Path.home() / "miniconda3/envs").rglob("lib/*") if "libpython" in x.name})'
3. Export env
Replace <full_path_to_libpython.so>
with your env's libpython path
echo 'export MOJO_PYTHON_LIBRARY="<full_path_to_libpython.so>"' >> ~/.bashrc
source ~/.bashrc
4. Install Modular CLI / Mojo
Replace <your key>
with key provided at developer.modular.com/download
curl https://get.modular.com | MODULAR_AUTH=<your key> sh -
modular install mojo
echo 'export MODULAR_HOME="$HOME/.modular"' >> ~/.bashrc
echo 'export PATH="$MODULAR_HOME/pkg/packages.modular.com_mojo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
5. Activate env and run
from python import Python as py
fn main() raises:
let np = py.import_module("numpy")
print(np.random.randn(3,7))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mojodojo-0.0.3.tar.gz
(7.4 kB
view details)
Built Distribution
File details
Details for the file mojodojo-0.0.3.tar.gz
.
File metadata
- Download URL: mojodojo-0.0.3.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95b0a0724f1d4e1652dffca2a5e93aeb07a4a59a7cd0ed7633bb0afe44c7befb |
|
MD5 | 9eebcb9b1f71a1c0324fb0adac8151b5 |
|
BLAKE2b-256 | df855fa1b94233f7b82781f95b5881b24eb87a176b6bcb9c16f332e15820644a |
File details
Details for the file mojodojo-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: mojodojo-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea21049bd1a0060dbcb3562b8e45f002152e40ba6064ba332ee264e084d11f71 |
|
MD5 | 2d8cd96836f551132cf4396d47de76bd |
|
BLAKE2b-256 | 6b1b04cb8a38b0a90c63f4d8960c6564bd024a601b888ab43abb53347d97b782 |