kdpsingh / clinspacy

Clinical Natural Language Processing using spaCy, scispacy, and medspacy
Other
96 stars 19 forks source link

Installation error - issue with Python environment? #2

Closed drjgauthier closed 4 years ago

drjgauthier commented 4 years ago

Howdy! I tried installing your package but I'm having the following error message:

Thoughts?

poldham commented 4 years ago

Just confirming this issue.

kdpsingh commented 4 years ago

Thanks @poldham. In talking with @drjgauthier in this Twitter thread (https://twitter.com/drjgauthier/status/1296131812016533504?s=21) it sounds like the initial issue is resolved (that Python couldn't be located). The new error is that installation freezes at: "** testing if installed package can be loaded from temporary location"

I'm planning to open a separate issue for that. Although related to installation, the underlying issue is potentially different.

@poldham, can you try this to see if this resolves your issue:

reticulate::install_miniconda()

and then try reinstalling clinspacy.

poldham commented 4 years ago

Thanks @kdpsingh, yes that sounds right. I will dig around and see how it goes. As a regular spacy user it is great to see this pkg coming out! Best and thanks, Paul

kdpsingh commented 4 years ago

Thanks @poldham -- I will plan to update the README with instructions on installing miniconda (or in trying to have the package install it for you after confirming with the user).

If you're able to, let me know if that resolves the issue so that I can make that change and close this issue. Thanks!

poldham commented 4 years ago

Ok thanks @kdpsingh. The spacyr documentation is pretty good on installing miniconda and spacy and may be helpful for writing the documentation. As I will be shortly be away please go ahead and close as that will solve the issue I think.

kdpsingh commented 4 years ago

Ok thanks @kdpsingh. The spacyr documentation is pretty good on installing miniconda and spacy and may be helpful for writing the documentation. As I will be shortly be away please go ahead and close as that will solve the issue I think.

Thanks. Yes, I've been trying to take advantage of new reticulate features that enable the user to install an R package with Python dependencies without the need for a separate install_spacy() function.

My impression from reading reticulate documentation was that the reticulate::configure_environment() function, if placed in the packaging loading script, would automatically prompt the user to install miniconda if Python couldn't be found. It looks like that is not the case (or I'm using it incorrectly).

I've read the spacyr docs on how they set up spacy (which was borrowed from the tensorflow R package) but intentionally tried to go a different route due to new reticulate features. Prompting the user to install miniconda automatically shouldn't be too difficult so I'll plan to address this in an update.

kdpsingh commented 4 years ago

My planned fix:

This will hopefully minimize dependency and version-related conflicts with other Python environments.

kdpsingh commented 4 years ago

@drjgauthier When you get a chance see if the latest commit takes care of the installation issue for you. If not, let me know what OS you are using and which R. So far, I've only tested it on Windows and in R 3.6.

drjgauthier commented 4 years ago

I've just installed and loaded {clinspacy} successfully!

kdpsingh commented 4 years ago

I've just installed and loaded {clinspacy} successfully!

Great! Let me know if you run into issues the first time you run clinspacy(). Will close this issue for now.