Skip to content

How to use pixi inside scripts or Dockerfiles #690

Answered by ruben-arts
bcm0 asked this question in Q&A
Discussion options

You must be logged in to vote

He @bcm0,

If I understand correctly you are looking for pixi shell-hook which is a command that will ship with the next release. (or you try the main branch right now)

This would allow you to get the actual bash script to activate an environment directly.

$ pixi init test && cd test

$ pixi add python

$ pixi shell-hook > hook.sh

# Now you can remove pixi completely

$ source hook.sh

$ python
# now you will run the pixi installed python from your "test" project
>>> 

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@bcm0
Comment options

@ruben-arts
Comment options

Answer selected by bcm0
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants