-
Notifications
You must be signed in to change notification settings - Fork 52
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
Change shebang in run_midas.py #84
base: master
Are you sure you want to change the base?
Conversation
Hello. Recently systems have been adopting python 3 as the default, therefore specifying python2 in the shebang will avoid using the wrong python version.
Hi Ines. What is the error when running on a system with python 3 installed?
…On Fri, May 11, 2018 at 6:41 AM, Inês Mendes ***@***.***> wrote:
Hello. Recently systems have been adopting python 3 as the default,
therefore specifying python2 in the shebang will avoid using the wrong
python version.
------------------------------
You can view, comment on, or merge this pull request online at:
#84
Commit Summary
- Change shebang in run_midas.py
File Changes
- *M* scripts/run_midas.py
<https://github.com/snayfach/MIDAS/pull/84/files#diff-0> (2)
Patch Links:
- https://github.com/snayfach/MIDAS/pull/84.patch
- https://github.com/snayfach/MIDAS/pull/84.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#84>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACAbrSN17_ZPjxOB-9bfFA3_YE1YWBNhks5txZUOgaJpZM4T7eto>
.
|
My problem only happens because i'm running midas in a container environment that imports python3 as the default from my home and I find myself having to invoke run_midas directly with the python2 command. In this particular case the dependencies are only installed for python 2 so I'm not aware if midas is compatible with python3 as well, but specifying the python version in the shebang would save me this bit of extra work. If midas is meant to work with both python 2 and 3 I apologize for wasting your time. :) Best wishes! |
Yes it should work for python 2 and 3. But I develop in python 2, do
sometimes python 3 incompatibilities creep in. Sorry for the inconvenience!
…On Sat, May 12, 2018, 12:01 PM Inês Mendes ***@***.***> wrote:
My problem only happens because i'm running midas in a container
environment that imports python3 as the default from my home and I find
myself having to invoke run_midas directly with the python2 command. In
this particular case the dependencies are only installed for python 2 so
I'm not aware if midas is compatible with python3 as well, but specifying
the python version in the shebang would save me this bit of extra work. If
midas is meant to work with both python 2 and 3 I apologize for wasting
your time. :) Best wishes!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#84 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACAbrazdAucpy0IxfNQF_IC4XZiJ0YtOks5txxVagaJpZM4T7eto>
.
|
I believe the issue with python3 is that subprocess.check_output and similar operations now return array of bytes which is no longer directly useable as a text string -- you need to decode() it first -- so in practice I've found that using a wrapper function around those types of operations that just calles decode() on their results seems to work well for compatibility. |
Hello. Recently systems have been adopting python 3 as the default, therefore specifying python2 in the shebang will avoid using the wrong python version.