mirror of
https://github.com/qwang98/PyChiquito.git
synced 2026-01-10 13:48:07 -05:00
* updated tutorial * update tutorial * new error emerge after updating submodule, was fully debugged previously * updated rust bindings and formatted python files * minor * updated submodule * cargo fmt * cleaned latest merge main; debugged and updated all tutorial files * addressed leo's comments' * removed num_step_instances * updated dependencies and deleted unwanted functions
57 lines
2.2 KiB
Plaintext
57 lines
2.2 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "11105438-f775-4ff5-a91c-b236aedd9eb1",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Part 2: Quick Start\n",
|
|
"PyChiquito requires using a Python virtual environment for its dependencies, which you should have setup following the [PyChiquito README](https://github.com/qwang98/PyChiquito#readme).\n",
|
|
"\n",
|
|
"Specifically, after cloning PyChiquito, you need to run the following commands in your local repo (NOT in this Jupyter Notebook), till you see `(.env)` at the start of your command line, which means that you've successfully enabled the virtual environment. You also need to install required dependencies to your local environment and build the project using `maturin develop`. Again, these are all done in your local command line.\n",
|
|
"\n",
|
|
"```\n",
|
|
"python3 -m venv .env\n",
|
|
"\n",
|
|
"source .env/bin/activate\n",
|
|
"\n",
|
|
"pip install -r requirements.txt\n",
|
|
"\n",
|
|
"maturin develop\n",
|
|
"```\n",
|
|
"\n",
|
|
"Now, run the following in your local command line to navigate to the `PyChiquito/pychiquito` directory which contains all the Python files. Install Jupyter Lab if you haven't. Then install your local Python virtual environment that's already setup as a Jupyter Lab Kernel called `pychiquito_kernel`. After that, activate Jupyter Lab. Finally, in the browser, navigate to `tutorial_pt3_ch1.ipynb` to start using the interactive part of this tutorial. Make sure you are using the Jupyter Lab Kernel called `pychiquito_kernel`, which you can change by going to the `Kernel` tab of Jupyter Lab's top menu bar and click `Change Kernel...`\n",
|
|
"\n",
|
|
"```\n",
|
|
"cd pychiquito\n",
|
|
"\n",
|
|
"pip install jupyterlab\n",
|
|
"python -m ipykernel install --user --name=pychiquito_kernel\n",
|
|
"jupyter lab\n",
|
|
"```"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "pychiquito_kernel",
|
|
"language": "python",
|
|
"name": "pychiquito_kernel"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.11.4"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|