如何为 conda create 指定新的环境位置 [英] how to specify new environment location for conda create

查看:38
本文介绍了如何为 conda create 指定新的环境位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

软件包的默认位置是我的主目录中的 .conda 文件夹.但是,在我使用的服务器上,我可以使用多少空间有一个非常严格的限制,这基本上避免了我将任何东西放在我的主目录下.如何指定要创建的虚拟环境的位置?谢谢!服务器正在运行 Ubuntu.

解决方案

使用 --prefix-p 选项指定写入环境文件的位置.例如:

conda create --prefix/tmp/test-env python=2.7

将创建名为 /tmp/test-env 的环境,该环境驻留在 /tmp/ 中,而不是默认的 .conda.p>

the default location for packages is .conda folder in my home directory. however, on the server I am using, there is a very strict limit of how much space I can use, which basically avoids me from putting anything under my home directory. how can I specify the location for the virtual environment that I want to create? Thanks! server is running Ubuntu.

解决方案

Use the --prefix or -p option to specify where to write the environment files. For example:

conda create --prefix /tmp/test-env python=2.7

Will create the environment named /tmp/test-env which resides in /tmp/ instead of the default .conda.

这篇关于如何为 conda create 指定新的环境位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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