OS X卸载distutils已安装项目 [英] OS X Uninstall a distutils installed project

查看:96
本文介绍了OS X卸载distutils已安装项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在El Capitan上,我想用pip安装numpy.但是我收到以下错误:

I'm on El Capitan and I want to install numpy with pip. However I get the following error:

Detected a distutils installed project ('numpy') which we cannot uninstall. The metadata provided by distutils does not contain a list of files which have been installed, so pip does not know which files to uninstall.

现有的numpy版本似乎是1.10.4,而我尝试安装的版本是1.9.2,但我需要它.有没有办法使用distutils卸载此版本?还是至少可以通过某种方式告诉pip安装了numpy?

The existing numpy version seems to be 1.10.4 and the one I try to install is 1.9.2, but I need it. Is there a way to uninstall this version with distutils? Or at least any way to tell pip that there is numpy installed?

推荐答案

由于没有关于已安装文件的元数据,我找到了手动删除文件的最简单方法.只需检索模块的目录(我指的是:检索python模块路径),然后删除文件夹以及随附的.egg-info文件.然后安装不带--update标志的所需numpy版本.

Since there is no metadata about the installed files, I found the easiest way to be removing the files manually. Simply retrieve the directory of the module (I referred to this: Retrieving python module path), and delete the folder, as well as the accompanying .egg-info file. Then install your desired numpy version without the --update flag.

这篇关于OS X卸载distutils已安装项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆