[英]Conda is corrupted after pip install conda
运行命令“pip install conda”后,我的 conda 损坏了。 有什么办法可以恢复吗? 谢谢
这是我在运行 conda 命令时看到的错误
ERROR: The install method you used for conda--probably either `pip install conda`
or `easy_install conda`--is not compatible with using conda as an application.
If your intention is to install conda as a standalone application, currently
supported install methods include the Anaconda installer and the miniconda
installer. You can download the miniconda installer from
https://conda.io/miniconda.html.
只需按照错误中给出的说明进行操作:下载 miniconda,然后通过键入以下命令运行脚本文件: bash <file_name.sh>
例如bash Miniconda3-latest-Linux-x86_64.sh
。
现在重新打开终端以使更改生效。
如果您的系统上已经安装了bash Miniconda3-latest-Linux-x86_64.sh -f
,您可以使用-f
force 选项重新安装它,例如bash Miniconda3-latest-Linux-x86_64.sh -f
要测试您的安装,请输入命令conda --version
。 如果安装正确,您将看到安装的 conda 版本。
miniconda: https ://conda.io/en/latest/miniconda.html
conda 故障排除: https ://conda.io/docs/troubleshooting.html
TL;DR :没有任何损坏,您看到的消息是硬编码的存根,可以修复。
conda包管理器实际上可以与常规 python 安装一起使用。
更新:我一直在修改所描述的方法,发现您应该使用conda install --dry-run ...
查看即将发生的更改。 一些 conda 包依赖于其他 python 版本,这会覆盖已安装的版本。 可以通过更改 conda 通道或使用 virtualenv 来解决此问题。 我还发现--dry-run
在使用本地包存档时不起作用。
我将向您展示如何在没有任何 Anaconda 和 python-3.6-amd64 的情况下运行 cudatoolkit 9.1。 我从这里使用 cuda 9.1。
由于 conda 是人为地与 Anaconda 相连,因此您必须解开它们。 我建议您备份您将使用的 python 安装目录(或使用 virtualenv)。
python setup.py install
这个包在 Anaconda 发行版中也有问题。 它每次都会触发一系列对管理员权限的请求,应该使用conda ... --no-shortcuts
选项来抑制这些请求。
pip install pypiwin32
, (1) 的依赖
pip install conda
,需要(1)
移动到python安装目录。 ./Scripts/conda.exe应该存在。
移至./Lib/site-packages/conda
在以下TEXT文件类型中递归搜索目录以查找 pip_warning子字符串:.py、.json、.txt
不要忘记遵守您要编辑的文件类型的语法。
检查文件大小没有改变。
如果您只需要在没有 cuda 的情况下使用 conda,那么您就完成了。
运行conda install mkl
, pip install llvmlite numpy
conda install cudatoolkit-9.1-0.tar.bz2
conda install numba-0.36.2-***.tar.bz2
稍等片刻,开箱完毕。
现在尝试这些示例,它们应该可以工作并且您的 gpu 监视器显示一些活动。 conda ...
命令也可以工作。
对于 Linux,我想指令是相同的,只是用 .sh 或 ELF 代替 .exe。
如果您在虚拟机 (VM) 中遇到此问题,则必须通过运行以下代码行来激活主环境:
source /anaconda_installation_folder_path/bin/activate
进入主环境后,您可以使用 conda。
下载 miniconda,然后输入以下命令运行脚本文件: bash <file_name.sh> 例如 bash Miniconda3-latest-Linux-x86_64.sh -u
'-u' : 更新标签,在原始 conda bash 路径由于 .bashrc 文件中的某些修改而丢失时使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.