2

我在为 python 3 安装 snomed 时遇到问题。我有一个虚拟环境。安装 snomed 的教程在此链接中:

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

第 3 步的问题是这些链接中的哪一个是 CIM10 和 ICD10 ?所以我可以在步骤 4 中正确设置变量。 在此处输入图像描述

以及如何在 python 3 的虚拟环境中安装这个库?

Heloo 我正在尝试安装PyMedTermino 0.3.2在 python virtal env 中。我已按照站点中文档的说明进行操作,http://pythonhosted.org/PyMedTermino/tuto_en.html#installation 但它不起作用。所以下面是带有数据变量的代码,错误是设置路径之后的注释

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'

#########################################################################
4

1 回答 1

0

从您的错误中可以看出 import_icd10.py 文件正在寻找名为 icd102010en.xml 的 xml。您已经放置了名为 icdClaML2016ens 的那种类型的 xml,因此它会引发错误。您应该像这样放置 ICD10_DIR 路径。 ICD10_DIR = "/home/angelica/Documents/PyEnv3/Snomed/ICD10 并将您的文件 xml 文件名更改为 icd102010en.xml。因此,在此行之后, xml = open(os.path.join(ICD10_DIR, "icd102010en.xml") 总路径将是 /home/angelica/Documents/PyEnv3/Snomed/ICD10/icd102010en.xml 因此它将起作用。

于 2017-11-02T02:53:02.657 回答