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

Support Python 3.4.1 runtime? #14

Open
wmayner opened this issue Dec 20, 2014 · 21 comments
Open

Support Python 3.4.1 runtime? #14

wmayner opened this issue Dec 20, 2014 · 21 comments

Comments

@wmayner
Copy link

wmayner commented Dec 20, 2014

Thanks for this very useful buildpack! Is there any way to get it working with 3.4?

@branliu0
Copy link
Owner

I would need to recompile all the packages for python 3.4. It's on my list of things to get to sometime soon...

@wmayner
Copy link
Author

wmayner commented Dec 21, 2014

Ok, let me know if I can help in some way!
On Dec 21, 2014 2:44 PM, "Brandon Liu" [email protected] wrote:

I would need to recompile all the packages for python 3.4. It's on my list
of things to get to sometime soon...


Reply to this email directly or view it on GitHub
#14 (comment)
.

@branliu0
Copy link
Owner

If you're really interested, one big TODO is to set up testing. Right now I've been manually testing, but once I get more packages set up, testing by hand is not very practical...

@abezzub
Copy link

abezzub commented Feb 24, 2015

I also need Python 3.4 support.

@thenovices can you please explain how you build packages? I see that https://github.com/thenovices/npscipy-binaries mentions using virtual machines, do you have some scripts to do it or do you do everything manually?

@branliu0
Copy link
Owner

Sorry, I'm pretty busy for the next two months so probably won't get to it... I build the packages manually. Basically, the amount of repetition thus far has been too low to merit the investment needed to script it...

@abezzub
Copy link

abezzub commented Feb 25, 2015

No problem. Do you just use VM with Ubuntu of the same version that Heroku uses? Or are there some additional requirements? Thanks

@branliu0
Copy link
Owner

Yeah, I think the three things are:

  1. Correct version of Ubuntu
  2. Correct version of GCC
  3. Same Python. In the case of Python 2, this meant that the Python had to be compiled with UCS2 instead of UCS4 (iirc). Not sure if this same logic applies for Python 3. But if I compiled the numpy package with a different Python (i.e., compiled with UCS4), then I would get a runtime error when I ran numpy on Heroku.

As far as I can remember, these were the only gotchas. The last thing is that the directory of the tarball needs to be correct. It looks like this for Python 2.7

venv/lib/python2.7/site-packages/numpy
venv/lib/python2.7/site-packages/numpy-1.9.0-py2.7.egg-info

@andrewychoi
Copy link

Quick note: for the new cedar-14 stack, sys.maxunicode is 1114111, which would indicate Python compiled against UCS-4

EDIT: this is incorrect as noted below, using the cedar-14 stack with Python 2.7.9, sys.maxunicode is actually 65335, which means you want a Python binary compiled against UCS-2

@branliu0
Copy link
Owner

Thanks, good to know!

@andrewychoi
Copy link

Revision to the above: the Python version on the new cedar-14 stack is actually 2.7.9, and sys.maxunicode is 65535. I think what happened was that I ran the code on the old cedar stack, and on that stack, the default Python version is 2.7.6 and sys.maxunicode is 1114111.

In any case, I've built a Vagrant script and a few shell scripts to interact with the VM. Hopefully this bridges some of the gap to build new versions.

The scripts are here: https://github.com/andrewychoi/npscipy-binaries and more specifically: https://github.com/andrewychoi/npscipy-binaries/tree/master/vagrant

@feliperyan
Copy link

@andrewychoi did you manage to get a python 3.4 version of this going? Anyone else?

@abezzub
Copy link

abezzub commented Aug 8, 2015

I ended up using conda to install math packages. There was a Python 2 buildpack for conda that I tweaked to work with Python 3: https://github.com/teamupstart/conda-buildpack

@andrewychoi
Copy link

@feliperyan No, I haven't tried getting this working on py3.4, but I'd imagine the changes are straightforward to make in the vagrant provisioning file: https://github.com/andrewychoi/npscipy-binaries/blob/master/vagrant/provision_numpy_scipy.sh

@feliperyan
Copy link

@andrewychoi Thanks for this Andrew, I'm new to Vagrant - I can see the Vagrantfile picks up on provision_numpy_scipy.sh but there are a number of other bash scripts in there. They seem to be auxiliary scripts to be ran by the host which do a few things in the box.

Do I need to worry about them at all? They make references to python 2.7

@andrewychoi
Copy link

Yes, they're scripts I used to construct the binary packaging. Essentially they ssh into the vagrant image, and copy the associated numpy/scipy files out to a new zipfile.

Looking at a couple of py3.4 projects I have, you'll need to change the prefix from venv/lib/python2.7 to venv/lib/python3.4 in those scripts.

@feliperyan
Copy link

Thank you @andrewychoi I might still give this a go at a later stage but for now I have followed @abezzub and got it working with the condo buildpack he kindly shared with us.
Btw my intention was to get Palladium working on Heroku, which I now have done.

@FreshDonut
Copy link

Any plans to still support 3.4 or is that no longer happening? Thanks! 😃

@branliu0
Copy link
Owner

branliu0 commented Apr 2, 2016

I'll get around to it someday, but I'm pretty busy these days :/

@FreshDonut
Copy link

No worries. : )

@feliperyan
Copy link

Yo,
I ended up getting it to work. My goal was to run palladium on it. From
memory it involved using P3.4
On Sat, 2 Apr 2016 at 21:11, byooo [email protected] wrote:

No worries. : )


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#14 (comment)

Sent from a mobile device, may contain spelling mistakes and traces of nuts.

@brianthomas
Copy link

I've forked this project to support additional libraries (gensim) for textmining under python 3.4.x. You can pull the binaries from that project which should make it easy to upgrade this one to 3.4.x. See :

https://github.com/brianthomas/ubuntu-textmining-binaries

which support the textmining buildpack:

https://github.com/brianthomas/heroku-buildpack-textmining

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

7 participants