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

make setup in new project doesn't find uv installed python versions #40

Closed
elyase opened this issue Nov 7, 2024 · 7 comments
Closed

Comments

@elyase
Copy link
Contributor

elyase commented Nov 7, 2024

No description provided.

@pawamoy
Copy link
Owner

pawamoy commented Nov 7, 2024

Hi @elyase, thanks for the report. Any error message?

@pawamoy
Copy link
Owner

pawamoy commented Nov 7, 2024

We're just running uv venv --python {version} under the hood so it should work 🤷

@elyase
Copy link
Contributor Author

elyase commented Nov 11, 2024

This is what I get in a new fresh project:

> git init .
Initialized empty Git repository in /Users/yaser/Documents/test-copier-uv/.git/
> make setup
Installing dependencies (default environment)
  × No interpreter found for executable name `python` in managed installations or search path
> uv python list
cpython-3.13.0+freethreaded-macos-aarch64-none    <download available>
cpython-3.13.0-macos-aarch64-none                 /opt/homebrew/opt/[email protected]/bin/python3.13 -> ../Frameworks/Python.framework/Versions/3.13/bin/python3.13
cpython-3.12.7-macos-aarch64-none                 <download available>
cpython-3.12.5-macos-aarch64-none                 /Users/yaser/.local/share/uv/python/cpython-3.12.5-macos-aarch64-none/bin/python3.12
cpython-3.11.10-macos-aarch64-none                <download available>
cpython-3.11.6-macos-aarch64-none                 /Users/yaser/.local/share/uv/python/cpython-3.11.6-macos-aarch64-none/bin/python3.11
cpython-3.10.15-macos-aarch64-none                /Users/yaser/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/bin/python3.10
cpython-3.9.20-macos-aarch64-none                 <download available>
cpython-3.9.6-macos-aarch64-none                  /Library/Developer/CommandLineTools/usr/bin/python3 -> ../../Library/Frameworks/Python3.framework/Versions/3.9/bin/python3
cpython-3.8.20-macos-aarch64-none                 <download available>
pypy-3.10.14-macos-aarch64-none                   <download available>
pypy-3.9.19-macos-aarch64-none                    <download available>
pypy-3.8.16-macos-aarch64-none                    <download available>

@pawamoy
Copy link
Owner

pawamoy commented Nov 11, 2024

Thanks. Looks like you don't have a single python executable available on your path. I'm not a macOS user so I wouldn't know what's the best way to provide one, other than using pyenv.

Maybe try this - in the make script, make this change:

     if not default_venv.exists():
-        shell("uv venv --python python")
+        shell("uv venv")

(line 59)

...and let me know if that works better 🙂

@elyase
Copy link
Contributor Author

elyase commented Nov 11, 2024

it works! thanks for the fix and quick reply!

Indeed I don't have a default global python executable (by design :-)). I stopped using pyenv since uv can now manage python installs too (uv python and uv tool)

@elyase elyase closed this as completed Nov 11, 2024
@pawamoy
Copy link
Owner

pawamoy commented Nov 11, 2024

Makes sense! Thanks for confirming it works, all tests pass with this change so I'll release it 😄

pawamoy added a commit that referenced this issue Nov 11, 2024
@elyase
Copy link
Contributor Author

elyase commented Nov 11, 2024

thanks a lot for the great template, will become my default now

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

No branches or pull requests

2 participants