Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad experience: Mac, python from brew, pip install uv #4624

Closed
anki-code opened this issue Jun 28, 2024 · 6 comments
Closed

Bad experience: Mac, python from brew, pip install uv #4624

anki-code opened this issue Jun 28, 2024 · 6 comments
Labels
question Asking for clarification or support

Comments

@anki-code
Copy link

anki-code commented Jun 28, 2024

Hey! Thank you for this awesome thing!

I tried to install it but had bad experience on Mac. Let's take a look:

which pip
# /opt/homebrew/bin/pip

pip -V
# pip 22.3.1 from /usr/local/lib/rustpython3.11/site-packages/pip

pip install uv
# ERROR: Could not install packages due to an 
# OSError: [Errno 13] Permission denied (os error 13): '/usr/local/bin/uv' -> 'None' 🔴 
# Consider using the `--user` option or check the permissions.

pip install --user uv
# Successfully installed uv-0.2.17
# WARNING: There was an error checking the latest version of pip. 🔴 

uv
# The command line interface for the uv binary.

uv pip install pandas
# error: No Python interpreters found in system toolchains 🔴 
@charliermarsh
Copy link
Member

Do you have Python installed?

@anki-code anki-code changed the title Bad experience on Mac with python from brew Bad experience: Mac, python from brew, pip install uv Jun 28, 2024
@anki-code
Copy link
Author

which python
# /opt/homebrew/bin/python

@charliermarsh
Copy link
Member

You should run uv venv first to create a virtual environment. (That error message is fixed on main.)

@zanieb
Copy link
Member

zanieb commented Jun 28, 2024

I believe I just fixed the error message you're seeing at #4596

We require creation of a virtual environment, so you need to run uv venv before you can uv pip install.

We don't support pip's user flag (#2077 )

@zanieb zanieb added the question Asking for clarification or support label Jun 28, 2024
@anki-code
Copy link
Author

anki-code commented Jun 28, 2024

I can't see the future error message in 4596 but I believe it will be like "Activate virtual env before install packages."

I used --user because of OSError: [Errno 13] Permission denied (os error 13): '/usr/local/bin/uv' -> 'None'.

After activating the environment it works as expected:

execx($(micromamba shell hook --shell xonsh))
mamba activate @('myenv')

uv pip install pandas
# Resolved 6 packages in 1.43s
# Prepared 5 packages in 2.66s
# Installed 5 packages in 75ms

Thanks!

@anki-code anki-code closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
@zanieb
Copy link
Member

zanieb commented Jun 28, 2024

Glad it's sorted out. We'll add more suggestions to the error messages there soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

3 participants