-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
shell script doesn't work for python paths with spaces #514
Comments
Michael Bayer (@zzzeek) wrote: I need detail on "this is the way celery solves the problem", because this behavior is not on the alembic side, it's part of pip. see pypa/pip#923 . are you on a very old version of pip? |
Michael Bayer (@zzzeek) wrote: it looks like the hack you are looking for is already implemented in pip, at least version 18 here has it:
here's the file, with the "exec" you are looking for:
so make sure you're on a recent version of pip |
Nonprofit Metrics wrote: I'm using pip 18.1, the current version of pip. I just reinstalled alembic, and I'm still getting this version of the shell file:
I'll update virtualenv, create a fresh virtualenv, and double-check. Perhaps is a python 2.7 thing. |
Michael Bayer (@zzzeek) wrote: works in python 2.7:
|
Nonprofit Metrics wrote: I was unable to reproduce when I created a new Virtualenv just now. I set this Virtualenv up a few years ago, so even though I have the current version of pip, something must be going on there. Apologies about the issue -- should I mark it as resolved, or can you delete it on your end? |
Nonprofit Metrics wrote: Made sure that pip and virtualenv were up-to-date before install alembic |
Changes by Nonprofit Metrics:
|
Migrated issue, originally created by Nonprofit Metrics
Upon installing Alembic into a Python Virtualenv, where a space exists in the python path, the "alembic" shell command fails with the message "bad interpreter: No such file or directory". I'm using alembic 1.0.1, just installed from pip.
It appears the error is from the shebang line in the script (...bin/alembic), which for me reads:
No way of escaping the path or spaces works at all. The way I got it to work is to replace the shebang line with:
This is the way celery and others solve the problem.
I couldn't figure out where setup.py generated the shell "bin/alembic" file, or else I would've submitted a pull request.
Thanks!
The text was updated successfully, but these errors were encountered: