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

python version? #10

Closed
vism2889 opened this issue May 24, 2018 · 18 comments
Closed

python version? #10

vism2889 opened this issue May 24, 2018 · 18 comments

Comments

@vism2889
Copy link
Contributor

having trouble using the install script, mainly getting this output:

File "/Users/morganvisnesky/Downloads/davidgranstrom-tidal-bootstrap-55b6864/tidal-bootstrap.command", line 77
    print "Please respond with 'yes' or 'no'"
                                            ^
SyntaxError: Missing parentheses in call to 'print'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Guessing it's because I have my machine defaulting to python3.6?
Is there a way around this? Thanks for your time!

@davidgranstrom
Copy link
Contributor

Try editing the first line of the script to point to python2. Default installation path for python (2) on macOS should be /usr/bin/python or if you have installed a later version with homebrew /usr/local/bin/python2

Another solution is to delete that line entirely and run the script like a usual python program e.g. python2 tidal-bootstrap.command

@vism2889
Copy link
Contributor Author

vism2889 commented May 24, 2018

changing to #!/usr/bin/env python2 seemed to do the trick. Any reason that this shouldn't permanently be replaced, so it always points to python2? Just curious, I actually don't know. Second question: How hard would it be to make a version of this that removes old or conflicting installs of tidal before installing anything new? or possibly prompts you about keeping or deleting existing tidal and SC installs?

EDIT: Also thanks a ton for your help!

@davidgranstrom
Copy link
Contributor

Great! I'm not sure macOS ships python2 by default, so I think its safest to keep it the way it is for now.

However, the script could surely be rewritten to work with both python2/3 easily. I don't actively maintain this script any more, it has been transfered to the tidal organization recently and I'm hoping the development will continue from here!

@vism2889
Copy link
Contributor Author

So MacOS does ship python 2 by default, also this script only works with python2, at least until its updated, mainly print statements have () in python 3. Leaving it the way it is, the script will try and use the systems default python, which many people these days have set to python3 or some intstall of anaconda, which will not work with this file. Understand you are no longer maintaining, how should i go about proposing this change?

@davidgranstrom
Copy link
Contributor

Yes. The script was intended to work "out-of-the-box" for a standard macOS install which ships with python 2.x by default.

Updating the script to work with both 2/3 or making sure it uses python2 by default would be great for sure. I think the best way is to fork this repo, make the changes, and submit a pull request and continue the discussion from there.

@vism2889
Copy link
Contributor Author

@davidgranstrom Cool! Thank you for your help, I submitted a request for the python2 specifier, I think I could make this compatible with python 2 and 3 pretty easily, or at least attempt it. Mainly I'm thinking you could put try: blocks around any print statements or python2 specific stuff, and have except: blocks with python3 alternatives. Maybe will attempt soon if you think that could work.

@yaxu
Copy link
Member

yaxu commented Jun 2, 2018

Thanks both, I've accepted the PR. Python3 compatibility would be great longer term!

@yaxu yaxu closed this as completed Jun 2, 2018
@yaxu
Copy link
Member

yaxu commented Jun 3, 2018

I changed this back to python for now, as python2 wasn't working on one of the macs I helped install today.. I'm not sure how we can make this work in all cases..

@yaxu yaxu reopened this Jun 3, 2018
@vism2889
Copy link
Contributor Author

vism2889 commented Jun 3, 2018

Oh snap... I'll see if I can mess with it. I'll try getting it to work with python 2 and 3. Sorry that fix didn't last too long, also i think that issue with ghci/haskell platform can possibly be remedied by changing the deps variable now listed as 'ghci' to 'haskell-platform'. Dunno how to specify 8.4.1 though..

@james-see
Copy link

Since it is over a year later and still no python3 support, I wrote a simple bash script that should install everything and setup TidalCycles for you no problem. Sometimes bash is fine for these things as opposed to a full CLI. Here is the script to download and run, enjoy and I welcome feedback. @davidgranstrom @yaxu @vism2889 https://gist.github.com/jamesacampbell/0622533809b1e2e6df845d8fee6c069d

@yaxu
Copy link
Member

yaxu commented Sep 4, 2019

Thanks @jamesacampbell! I don't have a mac so can't test it, unfortunately.

@vism2889
Copy link
Contributor Author

vism2889 commented Sep 4, 2019

Nice one @jamesacampbell! I'll test this out when I get a chance.

@yaxu
Copy link
Member

yaxu commented Sep 19, 2019

@jamesacampbell when you say it's untested, do you mean you have never run it?

@yaxu
Copy link
Member

yaxu commented Sep 19, 2019

@jamesacampbell I'd be happy to take a PR if you think the shell script is an improvement, but can't test it at all myself as I am macless

@james-see
Copy link

@yaxu I am saying untested elsewhere besides my personal macbook pro. I am being super cautious because I don't want to claim that it works without some rigor in others trying it first.

@yaxu
Copy link
Member

yaxu commented Oct 15, 2019

I've worked with the script a little bit so it should now install the complete system.
I've swapped it in, in place of the python.

@yaxu yaxu closed this as completed Oct 15, 2019
@yaxu
Copy link
Member

yaxu commented Oct 15, 2019

(Thanks a lot @jamesacampbell!)

@james-see
Copy link

Glad to see it in use. Cheers

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

4 participants