相关疑难解决方法(0)

使用pip找不到TensorFlow

我正在尝试使用pip来安装TensorFlow:

$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?到目前为止,我已经使用了Python和pip而没有任何问题.

python pip tensorflow

505
推荐指数
21
解决办法
57万
查看次数

pip 10和apt:如何避免distutils包的"无法卸载X"错误

我正在处理遗留的Dockerfile.这是我正在处理的非常简化的版本:

FROM ubuntu:14.04

RUN apt-get -y update && apt-get -y install \
    python-pip \
    python-numpy # ...and many other packages

RUN pip install -U pip

RUN pip install -r /tmp/requirements1.txt # includes e.g., numpy==1.13.0
RUN pip install -r /tmp/requirements2.txt
RUN pip install -r /tmp/requirements3.txt
Run Code Online (Sandbox Code Playgroud)

首先,使用安装几个软件包apt,然后使用安装几个软件包pip.pip版本10已经发布,部分版本是这个新限制:

删除了对卸载使用distutils安装的项目的支持.distutils安装的项目不包括指示哪些文件属于该安装的元数据,因此实际卸载它们是不可能的,而不是仅删除表示已安装的元数据,同时保留所有实际文件.

这导致我的设置中出现以下问题.例如,首先apt安装python-numpy.后来pip尝试安装新版本的numpy从如/tmp/requirements1.txt,并试图卸载旧版本,但由于新的限制,它无法删除此版本:

Installing collected packages: numpy
  Found existing installation: numpy 1.8.2
Cannot uninstall 'numpy'. It …
Run Code Online (Sandbox Code Playgroud)

python apt distutils pip docker

41
推荐指数
2
解决办法
4万
查看次数

PIP:"无法卸载'ipython'.这是一个安装了distutils的项目,因此我们无法准确确定......"

我正在尝试通过PIP 安装Spyder,但我收到错误:

无法卸载'ipython'.它是一个distutils安装的项目,因此我们无法准确确定哪些文件属于它,这将导致仅部分卸载.

python installation pip spyder

25
推荐指数
3
解决办法
4万
查看次数

无法卸载chardet

我一直在尝试使用pip卸载chardet,但是我收到以下错误:

"无法卸载'chardet'.这是一个安装了distutils的项目,因此我们无法准确确定哪些文件属于它,这只会导致部分卸载."

我的pip版本是10.0.0,python 2.7.14,Ubuntu 14.04.

pip chardet

6
推荐指数
1
解决办法
9203
查看次数

“pip3 install pipenv”给出错误:错误:无法卸载“distlib”

如何解决以下错误?

尝试pipenv在 Alpine上安装时:

pip3 install pipenv
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Installing collected packages: distlib, virtualenv, pipenv
  Attempting uninstall: distlib
    Found existing installation: distlib 0.3.0
ERROR: Cannot uninstall 'distlib'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Run Code Online (Sandbox Code Playgroud)

Python 版本:3.8.3
pip3 版本:20.2.2
Alpine 版本:3.12(Linux 5.4.43-1-virt #2-Alpine SMP Thu, 28 May 2020 20:13:48 UTC x86_64 Linux)

pip alpine-linux pipenv

5
推荐指数
1
解决办法
707
查看次数

如何在 Windows 操作系统中升级/卸载 distutils 软件包 (PyYAML)

我在 WIN10 中工作,使用 python 2.7.15

我尝试安装软件包,在安装过程中收到以下错误。

Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Run Code Online (Sandbox Code Playgroud)

我尝试使用 pip (18.1) 命令卸载,但收到了相同的错误。

pip uninstall PyYAML
Run Code Online (Sandbox Code Playgroud)

如何在 win10 操作系统中卸载/升级 distutils packge。

python pip python-2.7

2
推荐指数
1
解决办法
1万
查看次数