如何修复ImportError? [“ ValueError:[u'path'] \ n”]

时间:2019-06-08 05:51:38

标签: python command-line

我正在尝试导入.pyx文件,我确实导入了pyximport,但仍然显示无法导入,我错过了什么吗?

该代码正在Visual Studio代码中运行

import pyximport; pyximport.install(
setup_args = {
    "include_dirs": np.get_include()
},
reload_support = True)

从._tree导入tree_size

Traceback (most recent call last):
File "c:/Users/emoky/OneDrive/Desktop/test/data-miner-owner/data-miner/main.py", line 1, in <module>
from mdrModule import mdr
File "c:\Users\emoky\OneDrive\Desktop\test\data-miner-owner\data-miner\mdrModule\__init__.py", line 5, in <module>
from mdr import MDR, Record, RecordFinder, RecordAligner
File "c:\Users\emoky\OneDrive\Desktop\test\data-miner-owner\data-miner\mdrModule\mdr.py", line 21, in <module>
from ._tree import tree_size
File "C:\Python27\lib\site-packages\pyximport\pyximport.py", line 462, in load_module
language_level=self.language_level)
File "C:\Python27\lib\site-packages\pyximport\pyximport.py", line 233, in load_module
exec("raise exc, None, tb", {'exc': exc, 'tb': tb})
File "C:\Python27\lib\site-packages\pyximport\pyximport.py", line 215, in load_module
inplace=build_inplace, language_level=language_level)
File "C:\Python27\lib\site-packages\pyximport\pyximport.py", line 191, in build_module
reload_support=pyxargs.reload_support)
File "C:\Python27\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Python27\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Python27\lib\site-packages\Cython\Distutils\old_build_ext.py", line 194, in build_extensions
self.build_extension(ext)
File "C:\Python27\lib\distutils\command\build_ext.py", line 499, in build_extension
depends=ext.depends)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
self.initialize()
File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ImportError: Building module mdrModule._tree failed: ["ValueError: [u'path']\n"]

0 个答案:

没有答案