Scikit-学习不正确地在IPython中更新

时间:2013-08-23 04:44:53

标签: python-2.7 pip ipython rollback scikit-learn

我正在尝试使用IPython shell中的以下命令将IPython中的scikit-learn从0.13更新为0.14版本:

!pip install scikit-learn --update

所有内容似乎都在更新,但是当我查看点子日志时,我会看到以下内容(我将不胜感激):

 Rolling back uninstall of scikit-learn

  Replacing c:\anaconda\lib\site-packages\scikit_learn-0.13-py2.7.egg-info
Command C:\Anaconda\python.exe -c "import setuptools;__file__='c:\\users\\owner\\appdata\\local\\temp\\pip-build\\scikit-learn\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\owner\appdata\local\temp\pip-pqca_z-record\install-record.txt --single-version-externally-managed failed with error code 1 in c:\users\owner\appdata\local\temp\pip-build\scikit-learn

Exception information:
Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\pip\basecommand.py", line 107, in main
    status = self.run(options, args)
  File "C:\Anaconda\lib\site-packages\pip\commands\install.py", line 261, in run
    requirement_set.install(install_options, global_options)
  File "C:\Anaconda\lib\site-packages\pip\req.py", line 1166, in install
    requirement.install(install_options, global_options)
  File "C:\Anaconda\lib\site-packages\pip\req.py", line 589, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\Anaconda\lib\site-packages\pip\util.py", line 612, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Anaconda\python.exe -c "import setuptools;__file__='c:\\users\\owner\\appdata\\local\\temp\\pip-build\\scikit-learn\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\owner\appdata\local\temp\pip-pqca_z-record\install-record.txt --single-version-externally-managed failed with error code 1 in c:\users\owner\appdata\local\temp\pip-build\scikit-learn

1 个答案:

答案 0 :(得分:5)

您正在使用anaconda,因此您应该使用conda命令行(conda update scikit-learn)来更新Anaconda软件包而不是pip。