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

查看:1162
本文介绍了从.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 way to achieve this, I'm describing one here, which should be relatively straight forward, even if your defualt "python" variable is not anaconda's.

  1. 检查您所需的anaconda环境是什么(如果不确定这是什么意思,则可能意味着您使用的是默认环境root)
  2. 运行:conda info --envs以查看环境的安装路径
  3. 转到该路径,然后找到python.exe的绝对路径,例如: "C:\Program Files\Anaconda3\python.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 Files\Anaconda3\python.exe"
  4. Now, run the following command:

<absolute path to python.exe> -m pip install <path to tar.gz>

例如:

C:\Program Files\Anaconda3\python.exe -m pip install c:\mymodule\great.tar.gz

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

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

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

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