PyMedTermino Installation in python 3

1.4k Views Asked by At

I'm having trouble to install snomed for python 3. I have a virtual environment. The tutorial for instalation of snomed is in this link:

http://pythonhosted.org/PyMedTermino/tuto_en.html#installation

The step 3 is the problem which of these links are CIM10 and ICD10 ? so I can set correctly the variables in step 4. enter image description here

And how do I can install this lib in a virtual env in python 3 ?

Heloo I'm trying to install PyMedTermino 0.3.2 in a python virtal env. the I've followed the instructions on documentation in the site http://pythonhosted.org/PyMedTermino/tuto_en.html#installation but its not working. So bellow there is the code with the variables for the data and the mistakes are comments right after the setted paths

SNOMEDCT_DIR = 
SNOMEDCT_CORE_FILE =
ICD10_DIR = 
CIM10_DIR = 



# Get SNOMED CT CORE Problem list from:
# http://www.nlm.nih.gov/research/umls/Snomed/core_subset.html

# Example: SNOMEDCT_CORE_FILE = "/home/jiba/telechargements/base_med/SNOMEDCT_CORE_SUBSET_201502.txt"
# SNOMEDCT_CORE_FILE = "/home/angelica/Documents/PyEnv3/Snomed/SNOMEDCT_CORE_SUBSET_201702/SNOMEDCT_CORE_SUBSET_201702.txt"
SNOMEDCT_CORE_FILE = "/home/angelica/Documents/PyEnv3/Snomed/SNOMEDCT_CORE_SUBSET_201611/SNOMEDCT_CORE_SUBSET_201611.txt"
#ERROR
#/usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'zip_safe'
#  warning msg


# Get ICD10 from (NB choose "ClaML" format):
# http://apps.who.int/classifications/apps/icd/ClassificationDownload/DLArea/Download.aspx

# Example: ICD10_DIR = "/home/jiba/telechargements/base_med/icd10"
# ICD10_DIR = "/home/angelica/Documents/PyEnv3/Snomed/ICD10"
ICD10_DIR = "/home/angelica/Documents/PyEnv3/Snomed/ICD10/icdClaML2016ens"
# ICD10_DIR = ""
#ERROR
###############################################################
# /home/angelica/Documents/PyEnv3/bin/python ./scripts/import_icd10.py "/home/angelica/Documents/PyEnv3/Snomed/ICD10" ""
# Traceback (most recent call last):
#   File "./scripts/import_icd10.py", line 229, in <module>
#     else:                     xml = open(os.path.join(ICD10_DIR, "icd102010en.xml"), encoding = "latin").read()
# FileNotFoundError: [Errno 2] No such file or directory: '/home/angelica/Documents/PyEnv3/Snomed/ICD10/icd102010en.xml'

###############################################################
# Get ICD10 French translation from ATIH:
# http://www.atih.sante.fr/plateformes-de-transmission-et-logiciels/logiciels-espace-de-telechargement/id_lot/456

# Example: CIM10_DIR = "/home/jiba/telechargements/base_med/cim10"
CIM10_DIR = "/home/angelica/Documents/PyEnv3/Snomed/NomenclatureCim10_1"
# CI M10_DIR = ""
#ERROR
#########################################################################
# /home/angelica/Documents/PyEnv3/bin/python ./scripts/import_icd10.py "/home/angelica/Documents/PyEnv3/Snomed/ICD10" ""
# Traceback (most recent call last):
#   File "./scripts/import_icd10.py", line 229, in <module>
#     else:                     xml = open(os.path.join(ICD10_DIR, "icd102010en.xml"), encoding = "latin").read()
# FileNotFoundError: [Errno 2] No such file or directory: '/home/angelica/Documents/PyEnv3/Snomed/ICD10/icd102010en.xml'

#########################################################################
1

There are 1 best solutions below

0
On

From your error it is visible that import_icd10.py file is looking for the xml named icd102010en.xml. You have put that type of xml named icdClaML2016ens so it is throwing the error. You should put ICD10_DIR path like this. ICD10_DIR = "/home/angelica/Documents/PyEnv3/Snomed/ICD10 And change your file xml file name to icd102010en.xml.So after this line xml = open(os.path.join(ICD10_DIR, "icd102010en.xml") total path will be /home/angelica/Documents/PyEnv3/Snomed/ICD10/icd102010en.xml Hence It will work.