pixi init#
About#
Creates a new workspace
Importing an environment.yml
When importing an environment, the pixi.toml will be created with the dependencies from the environment file.
The pixi.lock will be created when you install the environment.
We don't support git+ urls as dependencies for pip packages and for the defaults channel we use main, r and msys2 as the default channels.
Usage#
Arguments#
-
<PATH>- Where to place the workspace (defaults to current path)
default:.
Options#
-
--channel (-c) <CHANNEL>- Channel to use in the workspace
May be provided more than once.
-
--platform (-p) <PLATFORM>- Platforms that the workspace supports
May be provided more than once.
-
--import (-i) <ENVIRONMENT_FILE>- Environment.yml file to bootstrap the workspace
-
--format <FORMAT>- The manifest format to create
options:pixi,pyproject,mojoproject
-
--scm (-s) <SCM>- Source Control Management used for this workspace
options:github,gitlab,codeberg
Description#
Creates a new workspace
This command is used to create a new workspace. It prepares a manifest and some helpers for the user to start working.
As pixi can both work with pixi.toml and pyproject.toml files, the user can choose which one to use with --format.
You can import an existing conda environment file with the --import flag.
Examples#
pixi init myproject # (1)!
pixi init ~/myproject # (2)!
pixi init # (3)!
pixi init --channel conda-forge --channel bioconda myproject # (4)!
pixi init --platform osx-64 --platform linux-64 myproject # (5)!
pixi init --import environment.yml # (6)!
pixi init --format pyproject # (7)!
pixi init --format pixi --scm gitlab # (8)!
- Initializes a new project in the
myprojectdirectory, relative to the current directory. - Initializes a new project in the
~/myprojectdirectory, absolute path. - Initializes a new project in the current directory.
- Initializes a new project with the specified channels.
- Initializes a new project with the specified platforms.
- Initializes a new project with the
dependenciesandchannelsfrom theenvironment.ymlfile. - Initializes a new project with the
pyproject.tomlformat. - Initializes a new project with the
pixi.tomlformat and thegitlabSCM.