Installation and introduction to Pixi#
Learning Objectives#
After working through this topic, you should be able to:
Explain why we use pixi to install Python
Follow the installation instructions at https://pixi.sh/latest/#installation
Execute python files from your shell using
pixi run
Pre-installation steps for macOS#
Verify you have the Xcode Command Line Tools installed by running:
xcode-select -p
If they are not installed you will see xcode-select: error: unable to get active developer directory....
You can che what the output means here.
You can install Xcode Tools with:
xcode-select --install
Once you make sure you have XCode installed continue with the Pixi installation.
Installation for Windows, Linux & MacOS#
Follow the installation instructions at https://pixi.sh/latest/#installation
Remember to start a new shell after installation!
In case you have any trouble, ask for help in the course Zulip
Troubleshooting (Windows)#
Sometimes there can be problems with the execution policies of Windows. You may get the following error when you try to activate a pixi shell:
File C:\Users\xxx\local\Temp\.xyz.ps1 cannot be loaded because
the execution of scripts is disabled on this system. ...
* CategoryInfo : SecurityError ...
* FullyQualifiedErrorId : UnauthorizedAccess
To fix this, we will have to change the execution policy.
Open a Powershell via the Windows Start menu as administrator. To open it as administrator you need to right click on it and select “Open as administrator”.
Now write
Set-ExecutionPolicy RemoteSignedFinally, close the Powershell, open a new, regular one (i.e., without administrator rights), and run
pixi shellagain.
Materials#
Video:
Download the slides.