寻找用于管理Python环境的跨平台(Linux,MacOS,Windows)工具 [英] Looking for a cross-platform (Linux, MacOS, Windows) tool for managing Python environments

查看:131
本文介绍了寻找用于管理Python环境的跨平台(Linux,MacOS,Windows)工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究将Anaconda环境用于CI / CD(据我所知,这是唯一支持Linux,MacOS和Windows的平台)。我试图使用Miniconda,它应该只安装最低限度的组件。但是,我意识到,默认情况下,Miniconda毕竟不是 mini。例如,如果我尝试创建一个新的Python环境( conda create -n py36 python = 3.6 anaconda ),它将安装一堆不需要的东西,例如 JupyterLab 等。因此,在转到 pyenv (对于Linux和MacOS)和 pyenv-win (对于Windows)之前,我想问:

I was investigating the use of Anaconda environments for CI/CD (since, to my knowledge, it is the only platform that supports Linux, MacOS, and Windows). I tried to use Miniconda which is supposed to only install the bare minimum. However, I realised that, by default, Miniconda is not "mini" after all. For example, if I attempt to create a new Python environment (conda create -n py36 python=3.6 anaconda), it will install a bunch of not needed stuff like JupyterLab and others. So, before moving to pyenv (for Linux and MacOS) and pyenv-win (for Windows), I would like to ask:


  • 是否可以用anaconda / miniconda设置不同的python环境,而不必每次都安装一堆额外的软件包创建新环境?

  • 是否有其他工具可用于管理支持Linux,MacOS和Windows的python环境?

谢谢。

推荐答案

仅由

conda create -n py36 python=3.6

没有 anaconda 软件包。

conda create -n py36 python = 3.6


  • conda创建-n py36 ,创建环境,实际上是一个空文件夹

  • python = 3.6 ,已安装python 3.6进入这个环境

  • conda create -n py36, create an environment, actually an empty folder
  • python=3.6, installed python 3.6 into this env

conda 是一个程序包管理器,两者均 python anaconda 是可以安装的软件包。

conda is a package manager, both python and anaconda are packages could be installed by it.

与包 python 不同, anaconda 元软件包,其中不包含实际软件,而仅取决于要安装的其他软件包

下载 anaconda 此处并从中提取内容。 info / recipe / meta.yaml 中列出了要安装的实际软件包。

Download an anaconda package here and extract content from it. The actual packages to be installed is listed in info/recipe/meta.yaml.

package:
    name: anaconda
    version: '2019.07'
build:
    ignore_run_exports:
        - '*'
    number: '0'
    pin_depends: strict
    string: py37_0
requirements:
    build:
        - python 3.7.3 h8c8aaf0_1
    is_meta_pkg:
        - true
    run:
        - alabaster 0.7.12 py37_0
        - anaconda-client 1.7.2 py37_0
        - anaconda-project 0.8.3 py_0
        # ...
        # about 260 packages in total

这篇关于寻找用于管理Python环境的跨平台(Linux,MacOS,Windows)工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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