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

🔧 Run task by the same Python environment used to run Copier #1157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

waketzheng
Copy link

My development environment is MacOS with default Python version 2.7, and I got the following error when running copier:

 > Running task 1 of 1: python .copier/update_dotenv.py
  File ".copier/update_dotenv.py", line 16
    if line.startswith(f"{upper_key}="):
                                     ^
SyntaxError: invalid syntax

How to reproduce:

alias python=python2
copier copy https://github.com/tiangolo/full-stack-fastapi-template my-awesome-project --trust

As the copier document says: we can use "{{ _copier_python }}" to run script by the same Python environment used to run Copier.

@tuukka
Copy link

tuukka commented Apr 25, 2024

I needed this on an Ubuntu system that does not have /usr/bin/python at all (need to use python3) - thank you for the fix!

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

Successfully merging this pull request may close these issues.

None yet

2 participants