Skip to content

rustvu/py_pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py_pi

Implementing Monte-Carlo-based π estimation as a Python module.

Requirements

It is highly recommended to build and run this code in a Python virtual environment. The easiest way is to use the Anaconda distribution, but you can use your preinstalled Python interpreter, also.

Option A: Anaconda

  1. Install Anaconda

  2. In the command prompt (Anaconca Prompt on Windows), create a new virtual environment (with some key packages installed):

conda create -n py_pi python jupyter numpy maturin
  1. Activate your environment
conda activate py_pi
  1. Build (release profile) and install this package in your virtual environment
maturin develop -r
  1. Launch Jupyter Lab, and open the experiment.ipynb notebook in your browser. Play with it.
jupyter lab

Option B: Pre-installed Python

Needs at least Python 3.7.

  1. In the command prompt, create a new virtual environment:
python3 -m venv .venv
  1. Activate your environment

    • On macOS/Linux:
    source .venv/bin/activate
    • On Windows:
    .\Scripts\activate.bat
  2. Install required Python packages

pip install jupyter numpy maturin
  1. Build (release profile) and install this package in your virtual environment
maturin develop -r
  1. Launch Jupyter Lab, and open the experiment.ipynb notebook in your browser. Play with it.
jupyter lab

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published