Skip to content

Using Xonsh and Rye together? #5290

Closed Answered by anki-code
jsquaredosquared asked this question in Q&A
Discussion options

You must be logged in to vote

This works for me for case 1:

docker run -it --rm python:3.12-slim bash
apt update && apt install -y curl
curl -sSf https://rye-up.com/get | bash 
source "$HOME/.rye/env"
rye install 'xonsh[full]'
xonsh

# Install pip using xonsh's python
# from xonsh shebang:
@($(head -n1 @$(which xonsh))[2:-1]) -m ensurepip --upgrade
# OR from xpip alias in case python already detected:
@(aliases['xpip'][0]) -m ensurepip --upgrade

# Now it works
xpip install xontrib-prompt-bar numpy
xontrib load prompt_bar
import numpy

I had a short look but can't find how to install packages into the appropriate tool environment using rye.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@anki-code
Comment options

Answer selected by jsquaredosquared
@anki-code
Comment options

@jsquaredosquared
Comment options

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
2 participants