square / pysurvival

Open source package for Survival Analysis modeling
https://www.pysurvival.io/
Apache License 2.0
347 stars 107 forks source link

Installation fails #59

Open elopezfune opened 1 year ago

elopezfune commented 1 year ago

I am trying to install the library on my computer pip install pysurvival, however, I get the following error message


      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pysurvival

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I am running on Ubuntu 22.04.1 LTS, python version 3.10.06
markoke commented 1 year ago

The only option is for you to download an archive version of anaconda with python 3.7 (2019 version). Then you should be able to install it on its venv

elopezfune commented 1 year ago

I did and I still get the same error message

mdsatria commented 1 year ago

I have the same error. Make sure you installed C++ compiler and assign environment variables as mentioned in this installation guide

Since the current GCC and G++ version is 11, this command should work sudo apt install gcc g++ export CXX=/usr/bin/g++-11 export CC=/usr/bin/gcc-11

Or change the version of GCC and G++ when assigning the environment variable

elopezfune commented 1 year ago

I am using Windows 11

maximeheowkin commented 1 year ago

current version is 12 no? same here, can't install