python - Buiding with distutils gives TypeError: expected str, bytes or os.PathLike object, not list -
i trying build sklearn.tree
subpackage, includes cython code. use python 3.6.1 on windows numpy 1.12.1.
the file setup.py
(can downloaded here) contains distutils configuration code such config.add_extension("_tree", sources=["_tree.pyx"],...)
expect sources
(this variable flops through long stack of functions listed below) list of strings.
however, when trying build package, recieve output listed below. implies source
in functions in build_src.py
, element of sources
, not string list.
so questions are:
- did string indeed turn list; if so, where?
- is error caused way build module; if so, how build correctly?
- is error caused way
setup.py
written? if so, how change it? , how did developers of sklearn use it? - is error caused environment? if so, should change?
c:\users\ddale\downloads\scikit-learn-master\sklearn\tree>python setup.py build_ext appending tree.tests configuration tree ignoring attempt set 'name' (from 'tree' 'tree.tests') running build_ext running build_src build_src building extension "tree._tree" sources warning: assuming default configuration (tests/{setup_tests,setup}.py not found)traceback (most recent call last): file "setup.py", line 39, in <module> setup(**configuration_old().todict()) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\site-packages\numpy\distutils\core.py", line 166, in setup return old_setup(**new_attr) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\distutils\core.py", line 148, in setup dist.run_commands() file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\site-packages\numpy\distutils\command\build_ext.py", line 82, in run self.run_command('build_src') file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 148, in run self.build_sources() file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 165, in build_sources self.build_extension_sources(ext) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 330, in build_extension_sources sources, py_files = self.filter_py_files(sources) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 390, in filter_py_files return self.filter_files(sources, ['.py']) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\site-packages\numpy\distutils\command\build_src.py", line 399, in filter_files (base, ext) = os.path.splitext(source) file "c:\users\ddale\appdata\local\continuum\anaconda3\lib\ntpath.py", line 223, in splitext p = os.fspath(p) typeerror: expected str, bytes or os.pathlike object, not list
Comments
Post a Comment