困っていること
インタラクティブシェルで
import docx
を実行すると、エラーが発生してしまいます。
python-docxはインストール済みです。
使用環境はAnaconda3です。
このエラーが起こる原因を教えていただけないでしょうか。
発生している問題・エラーメッセージ
Traceback (most recent call last): File "C:\Users\mgkyh\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2961, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-326e089686b3>", line 1, in <module> import docx File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "C:\Users\mgkyh\Anaconda3\lib\site-packages\docx\__init__.py", line 3, in <module> from docx.api import Document # noqa File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "C:\Users\mgkyh\Anaconda3\lib\site-packages\docx\api.py", line 14, in <module> from docx.package import Package File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "C:\Users\mgkyh\Anaconda3\lib\site-packages\docx\package.py", line 11, in <module> from docx.opc.package import OpcPackage File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "C:\Users\mgkyh\Anaconda3\lib\site-packages\docx\opc\package.py", line 12, in <module> from .part import PartFactory File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "C:\Users\mgkyh\Anaconda3\lib\site-packages\docx\opc\part.py", line 12, in <module> from .oxml import serialize_part_xml File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "C:\Users\mgkyh\Anaconda3\lib\site-packages\docx\opc\oxml.py", line 12, in <module> from lxml import etree File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) ImportError: DLL load failed: 指定されたモジュールが見つかりません。
該当のソースコード
python3
1import docx
回答1件
あなたの回答
tips
プレビュー