conda-init
v0.0.1
Published
A CLI tool to initialize Conda environments
Downloads
16
Maintainers
Readme
conda-init
A CLI tool to initialize Conda environments.
Installation
You can use this package without installing it by using npx
:
npx conda-init
Or you can install it globally:
npm install -g conda-init
Usage
Run the command:
conda-init [env_name] [python_version] [--create]
env_name
(optional): The name of the Conda environment. If not provided, it will use the current directory name.python_version
(optional): The Python version to use. Default is 3.10.14.--create
(optional): Automatically create the Conda environment after generating the environment.yml file.
If you don't provide the environment name or Python version, the script will prompt you for input.
Examples
Generate an
environment.yml
file with default settings:npx conda-init
Generate an
environment.yml
file with a specific name and Python version:npx conda-init myenv 3.9.7
Generate an
environment.yml
file and create the Conda environment:npx conda-init myenv 3.9.7 --create
Generate an
environment.yml
file with default settings and create the Conda environment:npx conda-init --create
What it does
- If not provided, prompts for environment name and Python version.
- Generates an
environment.yml
file in the current directory. - If the
--create
flag is used, creates a Conda environment based on the generated file. - Provides the command to activate the newly created environment.
Requirements
- Node.js >= 14.8.0
- Conda (must be installed and available in your PATH)
License
MIT