Agent Based Model repository for antimicrobial resistance
You can install the package via pip
:
pip install git+https://github.com/RodrigoZepeda/ABM_AMRO
To install the development version:
pip install git+https://github.com/RodrigoZepeda/ABM_AMRO@dev
You can also download the repository and build locally with:
python setup.py build_ext -i
Mac users require an installation of libomp
. This can be done with homebrew via
brew install libomp
If this is the first time you hear of homebrew you can check this tutorial.
Linux users require an installation of openmp
. In Ubuntu you can do it with:
apt install libomp-dev
You might have more than one compiler in your computer. The suggested ones are gcc
for
Linux and Windows and clang
for OSX. You can install using your
favourite compiler by passing the flag CC
before pip:
CC=/path/to/your/gcc pip install git+https://github.com/RodrigoZepeda/ABM_AMRO
To find the path of your compiler you can do where gcc
(or the compiler you want)
in Windows or which gcc
(or the compiler you want) in Unix.
You can raise an issue to report installation issues. Make sure to include the results of:
pip install --verbose git+https://github.com/RodrigoZepeda/ABM_AMRO
⚠️ I don't have Windows. I haven't tested it on Windows then.
Apparently, you might need a C++
compiler different from the native Windows one. You can download one
following this instructions. If you are using R
with Rtools
you probably already have one (try gcc --help
).
The recommended way for Windows is to use the Windows Subsystem for Linux
- Go to Powershell and write:
wsl --install
-
Download Ubuntu from the Microsoft Store
-
Open Ubuntu and follow the instructions entering a new username (all in lowercase letters)
Enter new UNIX username: your_username
- Enter a password for the system
New password: [your_secret_password_invisibly]
- Update the Ubuntu server
sudo apt update
sudo apt upgrade
- Install other tools
sudo apt install build-essential git libomp-dev
- Install miniconda
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
- Exit the terminal and reopen it
exit
- Create a new environment:
conda create -n AMRO
- Go to the environment:
conda activate AMRO
- Install pip:
conda install -y pip
- Install the package!
pip install git+https://github.com/RodrigoZepeda/ABM_AMRO
- Download the WSL Extension
- In VSCode press
F1
and chooseWSL: Connect to WSL using Distro in New Window
- Select the distro (
Ubuntu
) - Select the interpreter
CTRL + Shift + P > Python Select Interpreter > AMRO
- Start coding
To add new files into your Ubuntu machine, from the WSL terminal do:
explorer.exe .
to open the Window's explorer and know where your virtual machine lies
From the VSCode
terminal with WSL
you can install packages with conda
or pip
conda install pandas
pip install session_info
- Open a
ipynb
file and install the extensions - You might also need to Select the interpreter via
CTRL + Shift + P > Python Select Interpreter > AMRO
Go to the tutorial/
folder for tutorials
Go to How to contribute to learn more on the package's philosophy.