# 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](https://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
```python
from python import Python as py
fn main() raises:
let np = py.import_module("numpy")
print(np.random.randn(3,7))
```
Raw data
{
"_id": null,
"home_page": "https://github.com/trevorhobenshield/mojodojo",
"name": "mojodojo",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10.10",
"maintainer_email": "",
"keywords": "mojo dojo",
"author": "Trevor Hobenshield",
"author_email": "trevorhobenshield@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/df/85/5fa1b94233f7b82781f95b5881b24eb87a176b6bcb9c16f332e15820644a/mojodojo-0.0.3.tar.gz",
"platform": null,
"description": "# The Mojo Dojo\n\n### 1. Install LLVM\n\n```\nsudo apt install llvm\necho 'export LLVM_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer' >> ~/.bashrc\n```\n\n### 2. Find libpython path for your env\n\nAssuming env located at `~/miniconda3`\n\n```\npython3 -c 'import pathlib; sorted({print(x) for x in (pathlib.Path.home() / \"miniconda3/envs\").rglob(\"lib/*\") if \"libpython\" in x.name})'\n```\n\n### 3. Export env\n\nReplace `<full_path_to_libpython.so>` with your env's libpython path\n\n```\necho 'export MOJO_PYTHON_LIBRARY=\"<full_path_to_libpython.so>\"' >> ~/.bashrc\nsource ~/.bashrc\n```\n\n### 4. Install Modular CLI / Mojo\n\nReplace `<your key>` with key provided at [developer.modular.com/download](https://developer.modular.com/download)\n\n```\ncurl https://get.modular.com | MODULAR_AUTH=<your key> sh -\nmodular install mojo\necho 'export MODULAR_HOME=\"$HOME/.modular\"' >> ~/.bashrc\necho 'export PATH=\"$MODULAR_HOME/pkg/packages.modular.com_mojo/bin:$PATH\"' >> ~/.bashrc\nsource ~/.bashrc\n```\n\n### 5. Activate env and run\n\n```python\nfrom python import Python as py\n\nfn main() raises:\n let np = py.import_module(\"numpy\")\n print(np.random.randn(3,7))\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The Mojo Dojo",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/trevorhobenshield/mojodojo"
},
"split_keywords": [
"mojo",
"dojo"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6b1b04cb8a38b0a90c63f4d8960c6564bd024a601b888ab43abb53347d97b782",
"md5": "2d8cd96836f551132cf4396d47de76bd",
"sha256": "ea21049bd1a0060dbcb3562b8e45f002152e40ba6064ba332ee264e084d11f71"
},
"downloads": -1,
"filename": "mojodojo-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2d8cd96836f551132cf4396d47de76bd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10.10",
"size": 7674,
"upload_time": "2023-09-08T22:21:21",
"upload_time_iso_8601": "2023-09-08T22:21:21.775937Z",
"url": "https://files.pythonhosted.org/packages/6b/1b/04cb8a38b0a90c63f4d8960c6564bd024a601b888ab43abb53347d97b782/mojodojo-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "df855fa1b94233f7b82781f95b5881b24eb87a176b6bcb9c16f332e15820644a",
"md5": "9eebcb9b1f71a1c0324fb0adac8151b5",
"sha256": "95b0a0724f1d4e1652dffca2a5e93aeb07a4a59a7cd0ed7633bb0afe44c7befb"
},
"downloads": -1,
"filename": "mojodojo-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "9eebcb9b1f71a1c0324fb0adac8151b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10.10",
"size": 7437,
"upload_time": "2023-09-08T22:21:23",
"upload_time_iso_8601": "2023-09-08T22:21:23.371758Z",
"url": "https://files.pythonhosted.org/packages/df/85/5fa1b94233f7b82781f95b5881b24eb87a176b6bcb9c16f332e15820644a/mojodojo-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-08 22:21:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "trevorhobenshield",
"github_project": "mojodojo",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mojodojo"
}