Installation instructions
Note
We have not yet made Duplexity pip-installable, as the project is still in the early development stages. This means the code is constantly changing, and we currently don’t guarantee backwards compatibility when changes are made. Once a stable release of Duplexity is available, we will upload Duplexity to PyPI to make it pip-installable.
Prerequisites
Ensure you have the following prerequisites installed on your system:
Python (version 3.7 or later) (lower versions may work but are not tested).
Git (optional, but recommended for cloning the repository)
Install Duplexity from source
Clone the directory
Navigate to the directory you would like to clone the Duplexity repository into, and clone from GitHub:
git clone https://github.com/lexixu19/duplexity.git
Activate your environment
Create and/or activate the conda or pip environment you would like to use Duplexity within. For example:
conda create --name duplexity
conda activate duplexity
Install Duplexity
Ensure you are in the highest level of the Duplexity directory on your local system:
cd duplexity
You should be able to see setup.py in this directory. Run the following command to install Duplexity in your environment:
pip install .
Note
If you are a contributor or editor of the Duplexity environment, you should use pip install -e . to allow you to make edits which are immediately reflected when you import locally.
Importing Duplexity You should now be able to import Duplexity when running your environment! Try it out:
import duplexity
Test your installation
To test that Duplexity has been installed correctly, run the following command in your Python environment:
import duplexity.deterministic_score as ds
import numpy as np
x = np.array([5, 2, 7])
y = np.array([8, 2, 6])
ds.mean_squared_error(x, y)