YerevaNN / mimic3-benchmarks

Python suite to construct benchmark machine learning datasets from the MIMIC-III 💊 clinical database.
https://arxiv.org/abs/1703.07771
MIT License
805 stars 329 forks source link

requirement.txt does not work #125

Closed yx8njit closed 2 years ago

yx8njit commented 2 years ago

Dear authors, I started with a fresh venv created from python 3.9.6, then I tried to install the requirements file, but got errors, here are the msg. Please advice how to fix. Thanks! Yunpeng

python3 -m venv venv source venv/bin/activate python --version Python 3.9.6 pip install -r requirements.txt xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun ERROR: Command errored out with exit status 1: /Volumes/Seagate/WorkPlace/EHR/MIMIC/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7n/kzyc2xds4bv77kyskhy9l0m40000gn/T/pip-install-f8tuxnv6/scikit-learn_ebc8689210e64f069c9b001cbf6906a5/setup.py'"'"'; file='"'"'/private/var/folders/7n/kzyc2xds4bv77kyskhy9l0m40000gn/T/pip-install-f8tuxnv6/scikit-learn_ebc8689210e64f069c9b001cbf6906a5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/7n/kzyc2xds4bv77kyskhy9l0m40000gn/T/pip-record-06o3a4h7/install-record.txt --single-version-externally-managed --compile --install-headers /Volumes/Seagate/WorkPlace/EHR/MIMIC/venv/include/site/python3.9/scikit-learn Check the logs for full command output.

yx8njit commented 2 years ago

no worrries about the above error, which only happens on Mac. I tried on Linux and then saw environment copied successfully. meanwhile, with that requirement file, I still see an error when running python -m mimic3benchmark.scripts.extract_subjects {PATH TO MIMIC-III CSVs} data/root/, which complained "load() missing 1 required positional argument", so I followed suggestions on https://stackoverflow.com/questions/69564817/typeerror-load-missing-1-required-positional-argument-loader-in-google-col to use yaml.safe_load() instead of yaml.load().