MARC comes released as a set of project folders ready for learning and exploration.
We also update our tutorials repository with every release to show new users some of the capabilities and how to use the code. The tutorial files can be found here. If you would like to use these, you may either follow the GitHub download instructions on the develop page, but using https://github.com/mitleads/MARC_Tutorials, or you can download the files as a .zip using the “clone or download” button on the Tutorials GitHub page.
Below are the packages that MARC expects in order to run the tutorial cases. These are pip, numpy, scipy, matplotlip, plotly, scikit-learn, sklearn, pandas, geopy and kaleido. You can install the dependent packages separately in the terminal of your machine.
python3 get-pip.py
pip install numpy
pip install scipy==1.7.3
pip install matplotlib
pip install sklearn
pip install plotly
pip install kaleido
pip install pandas
pip install scikit-learn
pip install geopy
Alternatively, you can use a scientific python distribution like Anaconda. All the package dependencies like scipy and numpy will come pre-packaged and stuff will just work.
Once you’ve downloaded the code and prepared the software requirements, you’re ready to install it into python!
First, download the repository. There are two options:
In your terminal, run the following command: git clone https://github.com/mitleads/MARC.git.
Download directly from GitHub and extract the release archive.
Navigate to the trunk folder of MARC in the terminal by running the following command: cd MARC/trunk
Run this command: python3 setup.py install. You may need to run a sudo (super user do) command to install MARC when working on linux or mac systems: sudo python3 setup.py develop
Change to any other folder to test your installation - you can simply navigate to the previous folder i.e. MARC by running the following command: cd ..
Open a python shell by running the following command: python3
Test your MARC installation
In the command line, run >>> import MARC
Then, run >>> print (MARC.__file__)
This should print the file path to the MARC package init.py file in your trunk directory.
If all goes well, you are now able to import MARC into your python projects. If you’ve downloaded the tutorials as well, check out the guides for examples of using them!
After trying out the guides you may find you want to make changes to the innards of the package to fit your problem, take a look at the develop notes for how to set this up.
You shouldn’t need this part of the guide, unless you are unable to write-access the python site-packages directory. In that case, you can try these approaches to install MARC.
This involves the user install option
python3 setup.py install --user
MARC requires pip to uninstall. An alternate approach is provided further below if pip is not available.
Navigate to the MARC/trunk directory by command line.
Run the uninstall command. (On unix platforms, these commands may require a sudo (‘super-user-do’) call.)
python3 setup.py uninstall