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

Change shebang in run_midas.py #84

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

Conversation

cimendes
Copy link

Hello. Recently systems have been adopting python 3 as the default, therefore specifying python2 in the shebang will avoid using the wrong python version.

Hello. Recently systems have been adopting python 3 as the default, therefore specifying python2 in the shebang will avoid using the wrong python version.
@snayfach
Copy link
Owner

snayfach commented May 11, 2018 via email

@cimendes
Copy link
Author

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!

@snayfach
Copy link
Owner

snayfach commented May 12, 2018 via email

@boris-dimitrov
Copy link

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.

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.

3 participants