Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirement text file #141

Open
sbmubs opened this issue Mar 13, 2024 · 10 comments
Open

requirement text file #141

sbmubs opened this issue Mar 13, 2024 · 10 comments

Comments

@sbmubs
Copy link

sbmubs commented Mar 13, 2024

Hi, thank you for your valuable package,
After clone the mentioned repository, to install requirements(pip install -r requirements.txt), I found this error:
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

@matteo4diani
Copy link
Contributor

Hi @sbmubs, while the answer from @FeckNeck is technically correct, those requirements.txt files are outdated and could lead to undesired behaviors: the auton-survival project is now available on the Python Package Index so, if you just want to use auton-survival as a dependency in your own project, you only need to run pip install auton-survival.

If instead you want to contribute a fix or a feature to the project you should clone the repo, install poetry and use that for development. You can install the needed dependencies by running poetry install in the root of the project.

If you prefer working with a requirements.txt file in your own fork, then clone the repo and run poetry export --output requirements.txt. This will generate a version-locked and hashed requirements.txt file.

Hope this helps you out 🙂

@Jrhasse
Copy link

Jrhasse commented Jun 4, 2024

Hi @matteo4diani, I was trying to download the package via pip like you suggested doing. However, when doing so it starts out downloading and then encounters an error. I am including an screenshot of the bottom bit of the error. I will happily provide more information in order to get the package working on my system. Thanks!

image

@matteo4diani
Copy link
Contributor

Hi @Jrhasse, I need these info to help you troubleshoot the problem:

  • On which OS (and which version) are you running?
  • Which version of Python are you running?
  • Are you attempting to install in a virtual environment? If yes, which virtual environment management tool are you using?
  • Which dependencies are already installed in the Python environment where you are attempting this installation?

While you gather this info, at a glance it is most likely a problem with Python versions, try using a more recent version (3.10/3.11) and let me know if that fixes the problem.

@Jrhasse
Copy link

Jrhasse commented Jun 4, 2024

I am using Windows 11 (version 23H2). I just installed python via anaconda so I am using 3.12.3. I am relatively inexperienced with Python so my terminology may be incorrect, but my understanding is that it is not a virtual environment but is a conda environment (that is not the "base" environment). Below is a list of my modules/libraries in the environment I am trying to download your package into:
blas 1.0 mkl
bottleneck 1.3.7 py312he558020_0
brotli 1.0.9 h2bbff1b_8
brotli-bin 1.0.9 h2bbff1b_8
bzip2 1.0.8 h2bbff1b_6
ca-certificates 2024.3.11 haa95532_0
cffi 1.16.0 py312h2bbff1b_1
contourpy 1.2.0 py312h59b6b97_0
cycler 0.11.0 pyhd3eb1b0_0
expat 2.6.2 hd77b12b_0
filelock 3.13.1 py312haa95532_0
fonttools 4.51.0 py312h2bbff1b_0
freetype 2.12.1 ha860e81_0
fsspec 2024.3.1 py312haa95532_0
git 2.40.1 haa95532_1 anaconda
icu 73.1 h6c2663c_0
intel-openmp 2023.1.0 h59b6b97_46320
jinja2 3.1.4 py312haa95532_0
jpeg 9e h2bbff1b_1
kiwisolver 1.4.4 py312hd77b12b_0
krb5 1.20.1 h5b6d351_0
lcms2 2.12 h83e58a3_0
lerc 3.0 hd77b12b_0
libbrotlicommon 1.0.9 h2bbff1b_8
libbrotlidec 1.0.9 h2bbff1b_8
libbrotlienc 1.0.9 h2bbff1b_8
libclang 14.0.6 default_hb5a9fac_1
libclang13 14.0.6 default_h8e68704_1
libdeflate 1.17 h2bbff1b_1
libffi 3.4.4 hd77b12b_1
libpng 1.6.39 h8cc25b3_0
libpq 12.17 h906ac69_0
libtiff 4.5.1 hd77b12b_0
libuv 1.44.2 h2bbff1b_0
libwebp-base 1.3.2 h2bbff1b_0
lz4-c 1.9.4 h2bbff1b_1
markupsafe 2.1.3 py312h2bbff1b_0
matplotlib 3.8.4 py312haa95532_0
matplotlib-base 3.8.4 py312hc7c4135_0
mkl 2023.1.0 h6b88ed4_46358
mkl-service 2.4.0 py312h2bbff1b_1
mkl_fft 1.3.8 py312h2bbff1b_0
mkl_random 1.2.4 py312h59b6b97_0
mpmath 1.3.0 py312haa95532_0
networkx 3.1 py312haa95532_0
ninja 1.10.2 haa95532_5
ninja-base 1.10.2 h6d14046_5
numexpr 2.8.7 py312h96b7d27_0
numpy 1.26.4 py312hfd52020_0
numpy-base 1.26.4 py312h4dde369_0
openjpeg 2.4.0 h4fc8c34_0
openssl 3.0.13 h2bbff1b_2
packaging 23.2 py312haa95532_0
pandas 2.2.1 py312h0158946_0
pillow 10.3.0 py312h2bbff1b_0
pip 24.0 py312haa95532_0
ply 3.11 py312haa95532_1
pycparser 2.21 pyhd3eb1b0_0
pyparsing 3.0.9 py312haa95532_0
pyqt 5.15.10 py312hd77b12b_0
pyqt5-sip 12.13.0 py312h2bbff1b_0
python 3.12.3 h1d929f7_1
python-dateutil 2.9.0post0 py312haa95532_2
python-tzdata 2023.3 pyhd3eb1b0_0
pytorch 2.2.0 cpu_py312h746a3fd_0
pytz 2024.1 py312haa95532_0
qt-main 5.15.2 h19c9488_10
seaborn 0.12.2 py312haa95532_0
setuptools 69.5.1 py312haa95532_0
sip 6.7.12 py312hd77b12b_0
six 1.16.0 pyhd3eb1b0_1
sqlite 3.45.3 h2bbff1b_0
sympy 1.12 py312haa95532_0
tbb 2021.8.0 h59b6b97_0
tk 8.6.14 h0416ee5_0
tornado 6.3.3 py312h2bbff1b_0
typing_extensions 4.11.0 py312haa95532_0
tzdata 2024a h04d1e81_0
unicodedata2 15.1.0 py312h2bbff1b_0
vc 14.2 h2eaa2aa_1
vs2015_runtime 14.29.30133 h43f2093_3
wheel 0.43.0 py312haa95532_0
xz 5.4.6 h8cc25b3_1
zlib 1.2.13 h8cc25b3_1
zstd 1.5.5 hd43e919_2

@matteo4diani
Copy link
Contributor

Ok, I can see a couple of issues now, namely:

  1. auton-survival does not support PyTorch 2.x yet
  2. We didn't test auton-survival with Python 3.12 yet

You got two options:

  1. I prepared a PR for another user that wanted to use auton-survival with PyTorch 2, have a look at my response on this issue. Since you are using Conda, you should install auton-survival as a VCS (Version Control System) dependency, you can find the repo URL and the branch name in the pyproject.toml in the linked response.
  2. Create a fresh Conda env with Python 3.11, install auton-survival first so you'll get compatible versions of torch, sklearn, sksurv, etc., then add other libraries not included in auton-survival's dependencies as needed.

Let me know if one of these options is viable for you, and if it fixed your problem.

@Jrhasse
Copy link

Jrhasse commented Jun 4, 2024

I would rather use option 2 and use the versions that the module is meant to work with. Makes no difference to me as I need to learn it regardless. I created a fresh conda environment using 3.11.7 but now encountered this issue. It looks like pip cant find an old version of pytorch, but I am not sure. See below.

image

@matteo4diani
Copy link
Contributor

Try a new env with Python 3.10.

@Jrhasse
Copy link

Jrhasse commented Jun 4, 2024

Success! For anyone else who runs into similar issues. I ran the following in the anaconda prompt:
conda create --name myenv python=3.10
conda activate myenv
Python -V
pip install auton_survival

Thank you @matteo4diani for your help!

@matteo4diani
Copy link
Contributor

🎉 You're welcome @Jrhasse , happy to help.
Thanks for reaching out and enjoy auton-survival.

If you find anything that needs improvement or you need a missing feature please open a new issue here on GitHub :)

@MaurizioFi
Copy link

Thank you both! I was going crazy with this installation problem. It worked perfectly (provided one pays attention to run anaconda in myenv too :) ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants