从 .tar.gz 将模块安装到 Anaconda [英] Installing modules to Anaconda from .tar.gz

查看:23
本文介绍了从 .tar.gz 将模块安装到 Anaconda的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想将模块安装到 Anaconda 时,我运行 conda install.但是,现在我有一个 .tar.gz 文件并想安装它.怎么办?

When I want to install modules to Anaconda, I run conda install. However, now I have a .tar.gz file and want to install this. How to do?

推荐答案

有几种方法可以实现,我在这里描述一种,应该比较简单,即使你的默认 python 变量不是 anaconda 的.

There are several ways to achieve this, I'm describing one here, which should be relatively straight forward, even if your default python variable is not anaconda's.

  1. 检查你想要的 anaconda 环境是什么(如果你不确定这是什么意思,这可能意味着你使用的是 root,默认环境)
  2. 运行:conda info --envs 查看你的环境安装路径
  3. 转到该路径,找到 python.exe 的绝对路径,例如:C:Program FilesAnaconda3python.exe"
  4. 现在,运行以下命令:
  1. Check what is your desired anaconda environment (if you're not sure what does this mean, it probably means that you are using root, the default environment)
  2. Run: conda info --envs to see the path where your environment is installed
  3. Go to that path, and find the absolute path to python.exe, for example: "C:Program FilesAnaconda3python.exe"
  4. Now, run the following command:

<python.exe 的绝对路径>-m pip install <tar.gz 的路径>

例如:

C:Program FilesAnaconda3python.exe -m pip install c:mymodulegreat.tar.gz

请注意,<tar.gz 的路径> 可以是相对的、绝对的,甚至是在线链接.

Note that <path to tar.gz> can be relative, absolute and even an online link.

这篇关于从 .tar.gz 将模块安装到 Anaconda的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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