1

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

!pip install scikit-learn --update

一切似乎都在更新,但是当我查看 pip 日志时,我看到了以下内容(我将不胜感激):

 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
4

1 回答 1

5

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

于 2013-08-23T07:11:14.260 回答