0
我使用Python 2.7。我不使用Anaconda或Win-Python。我從命令提示符或Python命令行執行python文件。我嘗試安裝Scikit時出現錯誤使用pip
我想安裝scikit-learn來嘗試機器學習算法。
我用這個安裝scikit學習
pip install scikit-learn
這是我得到的
warning: manifest_maker: standard file '-c' not found
reading manifest file 'scikit_learn.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\fluenc~1\appdata\local\temp\pip_build_fluencer flu
n\setup.py", line 270, in <module>
setup_package()
File "c:\users\fluenc~1\appdata\local\temp\pip_build_fluencer flu
n\setup.py", line 266, in setup_package
setup(**metadata)
File "C:\Python27\lib\site-packages\numpy\distutils\core.py", lin
up
return old_setup(**new_attr)
File "C:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_comman
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_comman
cmd_obj.run()
File "C:\Python27\lib\site-packages\numpy\distutils\command\insta
62, in run
r = self.setuptools_run()
File "C:\Python27\lib\site-packages\numpy\distutils\command\insta
36, in setuptools_run
return distutils_install.run(self)
File "C:\Python27\lib\distutils\command\install.py", line 575, in
self.run_command(cmd_name)
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_comman
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\install_eg
ine 33, in run
self.run_command('egg_info')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_comman
cmd_obj.run()
File "C:\Python27\lib\site-packages\numpy\distutils\command\egg_i
11, in run
_egg_info.run(self)
File "C:\Python27\lib\site-packages\setuptools\command\egg_info.p
in run
self.find_sources()
File "C:\Python27\lib\site-packages\setuptools\command\egg_info.p
in find_sources
mm.run()
File "C:\Python27\lib\site-packages\setuptools\command\egg_info.p
in run
self.add_defaults()
File "C:\Python27\lib\site-packages\setuptools\command\egg_info.p
in add_defaults
self.read_manifest()
File "C:\Python27\lib\site-packages\setuptools\command\sdist.py",
read_manifest
self.filelist.append(line)
File "C:\Python27\lib\site-packages\setuptools\command\egg_info.p
in append
path = convert_path(item)
File "C:\Python27\lib\distutils\util.py", line 124, in convert_pa
raise ValueError, "path '%s' cannot be absolute" % pathname
ValueError: path '/home/andy/anaconda3/lib/python3.5/site-packages/
clude/numpy/arrayobject.h' cannot be absolute
----------------------------------------
Cleaning up...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__fi
rs\\fluenc~1\\appdata\\local\\temp\\pip_build_fluencer flux\\scikit
.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().
', '\n'), __file__, 'exec'))" install --record c:\users\fluenc~1\ap
emp\pip-1d_dxw-record\install-record.txt --single-version-externall
ompile failed with error code 1 in c:\users\fluenc~1\appdata\local\
d_fluencer flux\scikit-learn
Storing debug log for failure in C:\Users\fluencer flux\pip\pip.log
謝謝
謝謝。但是我已經安裝了conda,它可以在python命令行上運行。 – flu