Giter Club home page Giter Club logo

Comments (47)

bacalfa avatar bacalfa commented on June 2, 2024 14

It seems there's not much of a support going on with this project, which is unfortunate! :( I took the liberty of addressing this issue and pushed the changes to my forked project: https://github.com/bacalfa/pysurvival (I don't have permission to push changes to this repo). I was able to build and install it on Windows 10 (MSVC14), RHEL (gcc-8.2.0), and Mac (clang-1100.0.33.8).

  • Building the package
    python setup.py build_ext --inplace

  • Installing the package
    python setup.py install --user

Comments and feedback are welcome!

from pysurvival.

nd26 avatar nd26 commented on June 2, 2024 3

Hey @bacalfa, I've successfully managed to install pysurvival (on Windows) from your repository. Thank you!

from pysurvival.

XiangBu avatar XiangBu commented on June 2, 2024 3

For those who suffered a lot to install pysurvival as as me python 3.7, good luck

git clone https://github.com/bacalfa/pysurvival
cd pysurvival
pip install .

from pysurvival.

bharatbk avatar bharatbk commented on June 2, 2024 2

It seems there's not much of a support going on with this project, which is unfortunate! :( I took the liberty of addressing this issue and pushed the changes to my forked project: https://github.com/bacalfa/pysurvival (I don't have permission to push changes to this repo). I was able to build and install it on Windows 10 (MSVC14), RHEL (gcc-8.2.0), and Mac (clang-1100.0.33.8).

* Building the package
  `python setup.py build_ext --inplace`

* Installing the package
  `python setup.py install --user`

Comments and feedback are welcome!

Just tried it, looks like it required MSVC14 to install following those commands. Thanks for the try!

pysurvival-master>python setup.py build_ext --inplace
running build_ext
building 'pysurvival.utils._functions' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024 2

@DrShyamalaDevi Did you download or clone my modified project from https://github.com/bacalfa/pysurvival? Please try to install that project, and not the one in this original repository. The error you got was fixed with my modifications.

image

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024 1

Weird... do you have any compiler installed at all? You'll need it for the C++ extensions. If you only need the Python functionality, you just have to run the "install" command.

We all had problems installing via pip because it tried to compiled the C++ extensions. But if all you need is the Python package, you don't need to compile any code in this project.

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024 1

That's what we're discussing in this issue. The original project doesn't work on Windows. I don't have permission to submit my bug fixes. So I cloned the project on my page and fixed the problems there. You won't be able to install pysurvival on Windows from this repository until the maintainer fix the problems like I did on my repository.

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024 1

If you're only modifying Python code, you just have to run the following to copy your modifications to the right directories:

python setup.py install --user

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024 1

@CamilaFernandez8, please see my latest post here.

from pysurvival.

fxpaquette avatar fxpaquette commented on June 2, 2024 1

@bacalfa Thanks for your work, I was able to install pysurvival on Windows 10.

from pysurvival.

CedricBeaulac avatar CedricBeaulac commented on June 2, 2024

I find myself in the same predicament. Is the library even suppose to work for Windows ?

from pysurvival.

bharatbk avatar bharatbk commented on June 2, 2024

Same issue with Anaconda install. Perhaps one could fork the implementation to use Numpy primitives instead for doing calculations?

from pysurvival.

CoteDave avatar CoteDave commented on June 2, 2024

Hi, is there any hope to see a working version for windows ? Looks like the best package available for survival analysis ! Thanks!

from pysurvival.

DrShyamalaDevi avatar DrShyamalaDevi commented on June 2, 2024

bacalfa, I could not install pysurvival.
I have installed pytorch and the basic requirements. But still it is saying error
image
Capture
Can u help me out.

I have downloaded the GCC compiler too

from pysurvival.

DrShyamalaDevi avatar DrShyamalaDevi commented on June 2, 2024

image
I am getting the above error while installing pysurvival

from pysurvival.

DrShyamalaDevi avatar DrShyamalaDevi commented on June 2, 2024

i am not cloning or downloading ur project from ur github. i am trying to install the package pysurvival. will it work for windows os. i am trying to install in windows. and i am getting the above error

from pysurvival.

camferna avatar camferna commented on June 2, 2024

@bacalfa I installed the library from your github :D But I want to modify something, do you (or someone) know if there is any problem if I do that? Like should I have to reinstall the library or it should just work with the thing I added?
Thank you in advance!!

Cam

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

@CamilaFernandez8 Great! Is your modification general enough so that everyone else might use? If so, I could add you a collaborator so you can push your changes and I can review them. Otherwise, you can always make changes to your local copy and never publish them (this will keep your copy out-of-sync with my repository).

from pysurvival.

camferna avatar camferna commented on June 2, 2024

oooh no I'm a really bad/begginer programmer. Just trying to make some functions work with scikit learn and I'm afraid that if I modify the codes it will stop working and will have to reinstall it again. :(

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

What functions? And what kind of interoperability with sklearn are you looking for? Is it related to this issue? Again, you can always make changes to your local copy. That won't affect anyone else.

from pysurvival.

camferna avatar camferna commented on June 2, 2024

Yes, that issue :( No one answered it :(
I know it won't affect anyone else, I want to know if it will affect my own current library operation.

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

I haven't looked into that issue in detail. You can give it a try and see what happens. :) If I have some time, I'll see what I can do to address that, and then let you know.

from pysurvival.

camferna avatar camferna commented on June 2, 2024

But then, If I modify it and I want to run my program with the modifications. Do I need to install the whole library again or update it or something? or it is instantly ready to use it?

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

@canshop16 I don't think that error is related to pysurvival. Installation instructions are given above: #8 (comment). If you install it to a specific environment, make sure you're starting Jupyter Notebook from that environment.

from pysurvival.

canshop16 avatar canshop16 commented on June 2, 2024

@bacalfa Thank you so much for your contribution. I ran this on Anaconda prompt after downloading your setup.py file from your GitHub and it worked on Windows.

*Building the package
python setup.py build_ext --inplace

*Installing the package
python setup.py install --user

Thank you again.

from pysurvival.

KaranMehta21 avatar KaranMehta21 commented on June 2, 2024

@bacalfa When running your code in line #8, I get the following error:

(base) C:\Users\rmhikme\Desktop\pysurvival-master>python setup.py install --user
running install
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 2] No such file or directory: 'C:\Users\rmhikme\AppData\Roaming\Python\Python37\site-packages\test-easy-install-11600.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
C:\Users\rmhikme\AppData\Roaming\Python\Python37\site-packages
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

How should I fix this and install your version of pysurvival?

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

@KaranMehta21, I don't believe this is related to pysurvival. It may be due to your Python installation. Have you searched for this issue?

from pysurvival.

KaranMehta21 avatar KaranMehta21 commented on June 2, 2024

@bacalfa Not to worry - I was able to solve the problem and train the RSF model. Thanks!

from pysurvival.

SelverEzgi avatar SelverEzgi commented on June 2, 2024

@bacalfa thanx for fixing the windows issue. Now, i've installed the pysurvival on the windows using anaconda prompt.
Just you need the install C++ compiler (i installed VisualStudio Desktop Development C++) and run

python setup.py build_ext --inplace
line in anaconda prompt.
Before the install the package, (if you dont have, you can install pytorch, from anaconda environemnts) and after, run
python setup.py install --user
command.
Great work !

from pysurvival.

SurajitTest avatar SurajitTest commented on June 2, 2024

Hi All, Would really appreciate if anyone can help me. I have downloaded the package which is at location : C:\Users\User\Downloads\pysurvival-master. For me , I have installed Anaconda at C:\Users\User. I am providing you with the steps that I think I need to follow, please guide so that I can carry out the installation correctly.

Step-1: Create a Directory : C:\Users\User\pysurvival (as Anaconda is installed in C:\Users\User )
Step-2: Copy all contents from C:\Users\User\Downloads\pysurvival-master to C:\Users\User\pysurvival (now setup.py is in this location)
Step-3: Navigate to C:\Users\User\pysurvival (using command prompt)
Step-4: Run the 2 below commands
python setup.py build_ext --inplace (to rebuild the package)
python setup.py install --user (to install the files to your local directories)

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

@SurajitTest, and what's the error you get? You don't have to place the files in a specific location for the installation to work. Any directory is fine.

from pysurvival.

SurajitTest avatar SurajitTest commented on June 2, 2024

Hi @bacalfa, Thanks for your reply. Just wanted to know if my process of installation looks ok as I donot want to mess up my installation ?

I have downloaded the package which is at location : C:\Users\User\Downloads\pysurvival-master. For me , I have installed Anaconda at C:\Users\User. I am providing you with the steps that I think I need to follow, please guide so that I can carry out the installation correctly.

Step-1: Create a Directory : C:\Users\User\pysurvival (as Anaconda is installed in C:\Users\User )
Step-2: Copy all contents from C:\Users\User\Downloads\pysurvival-master to C:\Users\User\pysurvival (now setup.py is in this location)
Step-3: Navigate to C:\Users\User\pysurvival (using command prompt)
Step-4: Run the 2 below commands
python setup.py build_ext --inplace (to rebuild the package)
python setup.py install --user (to install the files to your local directories)

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

Looks OK to me.

from pysurvival.

jacobgqc avatar jacobgqc commented on June 2, 2024

In case anyone else has issues installing from @bacalfa's fork (thanks for updating this dead project :), ensure that you're using Python 3.8 or lower.
Using 3.9 will result in an error due to the deprecation of tp_print
https://stackoverflow.com/questions/65462530/pyclipper-installation-error-tp-print-is-not-a-member-of-typeobject

from pysurvival.

nezha205 avatar nezha205 commented on June 2, 2024

anyone has this error ?
thanks.
image

from pysurvival.

fxpaquette avatar fxpaquette commented on June 2, 2024

@nezha205 Refer to jacobgqc's anwser above. You get this error because you're using Python3.10

from pysurvival.

nezha205 avatar nezha205 commented on June 2, 2024

from pysurvival.

fxpaquette avatar fxpaquette commented on June 2, 2024

from pysurvival.

shanshui789 avatar shanshui789 commented on June 2, 2024

@bacalfa bacalfa, I could not install pysurvival.
123
Can you help me out? Thank you!

from pysurvival.

vastolaa avatar vastolaa commented on June 2, 2024

Hi @bacalfa

Thank you for your repository, I've successfully managed to install pysurvival. However, it still gives me an error when trying to import pysurvival.utils._functions
Any ideas how to solve this?

from pysurvival.

dsatija6 avatar dsatija6 commented on June 2, 2024

Doesn't seem to work with pip install pysurvival.

...
pysurvival/cpp_extensions/non_parametric.cpp(349): error C2065: 'M_PI': undeclared identifier
pysurvival/cpp_extensions/non_parametric.cpp(364): error C2065: 'M_PI': undeclared identifier
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

See https://stackoverflow.com/questions/6563810/m-pi-works-with-math-h-but-not-with-cmath-in-visual-studio.

Hey @bacalfa, all I want to do is use pysurvival in python to make a randomsurvivalforest model and use it. No C++ etc.
Is that possible? If yes what should I use? Every time I use python setup.py install or something similar it gives me
"building 'pysurvival.utils._functions' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

Is there a way around this? Thank you in advance!

from pysurvival.

naeemomer avatar naeemomer commented on June 2, 2024

I am facing issues to install pysurvival and not able to follow the process here.

Can someone please post the installation of the package, for windows 10, in steps?

Thanks

from pysurvival.

jacobgqc avatar jacobgqc commented on June 2, 2024

I am facing issues to install pysurvival and not able to follow the process here.

Can someone please post the installation of the package, for windows 10, in steps?

Thanks

Make sure you're using Python 3.8 or earlier. Other releases won't work.

Then instructions from XiangBu earlier:

git clone https://github.com/bacalfa/pysurvival
cd pysurvival
pip install .

from pysurvival.

morinstar avatar morinstar commented on June 2, 2024

Your package worked on my Win11, that was a pain in the Rs but we got your help, thx for your efforts! for any one on Windows, here is what I did:

  1. install C++ Microsoft visual studio, I installed the lastest version, community 2022
  2. open cmd, put"set SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True" and press enter to ignore the deprecated sklearn package error( supposed to not affect much in pysurvival package)
  3. download Bacalfa's repository
  4. cd to the directory where you put the repository
  5. put the two commends Bacalfa gave us above
  6. installed
    I also did a lot of changes during several other attempts but I guess they don't really help or matter, let me know if you are also on Windows and encounter with any other errors

from pysurvival.

KaranMehta21 avatar KaranMehta21 commented on June 2, 2024

Hi @bacalfa is there a way to plot calibration curves using the deepsurv model? A calibration plot showing predicted risk versus observed risk. Please advise

from pysurvival.

bacalfa avatar bacalfa commented on June 2, 2024

To anyone seeking my support, I haven't used this package since my initial post in 2019. I'm not maintaining it either. Sorry.

from pysurvival.

KaranMehta21 avatar KaranMehta21 commented on June 2, 2024

from pysurvival.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.