git clone https://gitlab.com/sintef/restshop.git
From now on it is assumed that you're standing at the root of this repo
Use version 14.0.0 of SHOP to copy these files from.
- shop_cplex_interface.dll
- shop_osi_interface.dll
- shop_pybind.pyd
NOTE: Currently pyshop supports python versions 3.7.x and 3.8.x. The python version must match the one used when building
shop_pybind.pyd
from SHOP.
NOTE: It is recommended to create a new environment, you don't have to call it "SHOP". Even though it is possible to reuse an existing environment, this is not recommended.
conda create -n SHOP python=3.7
conda activate SHOP
pip install -e SDK
python -c "import pyshop; pyshop.ShopSession(); print('ok')"
NOTE: You should see
ok
printed. If you get a bunch of text followed byImportError: DLL ...
then check your python versionpython --version
. Go back to step 3 and try with another python version, for example 3.8 <-> 3.7.
pip install -e .
pytest
uvicorn main:app --reload
Open this link -> localhost:8000/docs
Hit F5 and choose FastAPI