NLPatVCU / medaCy

:hospital: Medical Text Mining and Information Extraction with spaCy
GNU General Public License v3.0
429 stars 91 forks source link

pytorch error while install medaCy's clinical model #184

Closed Zaiku1972 closed 4 years ago

Zaiku1972 commented 4 years ago

OS: docker image : python:3.6-jessie medaCy is successful installed, but when trying to install medaCy's clinical model, but getting error with torch

Error Log:

    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-v4uqlzns/setup.py", line 3, in <module>
        from medacy_model_clinical_notes import __version__, __authors__
      File "/tmp/pip-req-build-v4uqlzns/medacy_model_clinical_notes/__init__.py", line 1, in <module>
        from .medacy_model_clinical_notes import load
      File "/tmp/pip-req-build-v4uqlzns/medacy_model_clinical_notes/medacy_model_clinical_notes.py", line 6, in <module>
        from medacy.model.model import Model
      File "/usr/local/lib/python3.6/site-packages/medacy-1.0.0-py3.6.egg/medacy/model/__init__.py", line 1, in <module>
        from medacy.model.model import Model
      File "/usr/local/lib/python3.6/site-packages/medacy-1.0.0-py3.6.egg/medacy/model/model.py", line 18, in <module>
        from medacy.pipelines.base.base_pipeline import BasePipeline
      File "/usr/local/lib/python3.6/site-packages/medacy-1.0.0-py3.6.egg/medacy/pipelines/__init__.py", line 1, in <module>
        from medacy.pipelines.clinical_pipeline import ClinicalPipeline
      File "/usr/local/lib/python3.6/site-packages/medacy-1.0.0-py3.6.egg/medacy/pipelines/clinical_pipeline.py", line 3, in <module>
        from medacy.pipeline_components.feature_extractors.discrete_feature_extractor import FeatureExtractor
      File "/usr/local/lib/python3.6/site-packages/medacy-1.0.0-py3.6.egg/medacy/pipeline_components/__init__.py", line 6, in <module>
        from medacy.pipeline_components.learners.bert_learner import BertLearner
      File "/usr/local/lib/python3.6/site-packages/medacy-1.0.0-py3.6.egg/medacy/pipeline_components/learners/bert_learner.py", line 4, in <module>
        import torch
      File "/usr/local/lib/python3.6/site-packages/torch-1.4.0-py3.6-linux-x86_64.egg/torch/__init__.py", line 81, in <module>
        from torch._C import *
    ImportError: dlopen: cannot load any more object with static TLS
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-v4uqlzns/

Attempts: I tired installing medaCy with import torch statement at the top of everything. Yet it didnt work.

swfarnsworth commented 4 years ago

Please let me know precisely what caused this error to occur. I just ran the following commands in a new Python 3.6.6 virtual environment and did not get any errors:

pip install --update pip
pip install git+https://github.com/NLPatVCU/medaCy.git@development
pip install git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git
Zaiku1972 commented 4 years ago

Please let me know precisely what caused this error to occur. I just ran the following commands in a new Python 3.6.6 virtual environment and did not get any errors:

pip install --update pip
pip install git+https://github.com/NLPatVCU/medaCy.git@development
pip install git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git

Using python 3.6.10. will that be an problem? and are you using anaconda python 3.6.6?

Zaiku1972 commented 4 years ago

Please let me know precisely what caused this error to occur. I just ran the following commands in a new Python 3.6.6 virtual environment and did not get any errors:

pip install --update pip
pip install git+https://github.com/NLPatVCU/medaCy.git@development
pip install git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git

okay it worked in anaconda virtual env This is what i did:

conda create -n myenv python=3.6.6
pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install git+https://github.com/NLPatVCU/medaCy.git@development
pip install git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git