Basic Usage
Ensure you've got pixi
set up. If running pixi
doesn't show the help, see the getting started if it doesn't.
Initialize a new project and navigate to the project directory.
Add the dependencies you would like to use.
Create a file named hello_world.py
in the directory and paste the following code into the file.
def hello():
print("Hello World, to the new revolution in package management.")
if __name__ == "__main__":
hello()
Run the code inside the environment.
You can also put this run command in a task.
After adding the task, you can run the task using its name.
Use the shell
command to activate the environment and start a new shell in there.
You've just learned the basic features of pixi:
- initializing a project
- adding a dependency.
- adding a task, and executing it.
- running a program.
Feel free to play around with what you just learned like adding more tasks, dependencies or code.
Happy coding!
Use pixi as a global installation tool#
Use pixi to install tools on your machine.
Some notable examples: