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 3 support #63
Comments
I feel like i should be moving faster toward 3 myself, so 👍 to keep the gravity moving that direction. |
Done. Look for py3-ortools on pypi. Thanks |
I think you might want to look for py3-ortools and not py3-or-tools? |
Corrected, thanks |
Python eggs for Windows are missing. Great work with Python 3 support! |
Yes, I need to build them :-) Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2015-12-14 12:47 GMT+01:00 Benjamin Gudehus notifications@github.com:
|
I'm getting a strange error with
I'm on OSX Yosemite, with |
Sorry, I built it for El Capitan. setuptools cannot support two versions of OSX simultaneously. --Laurent Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2015-12-17 15:20 GMT+01:00 Daniele notifications@github.com:
|
In this case I can build it from source, where can I find the instructions? Do I need to be careful of something in particular with pyenv or virtual environments? |
https://developers.google.com/optimization/installing On mac, install python3, checkout or-tools sources, after make third_party edit Makefile.local add ADD_PYTHON_INC = -I/Library/Frameworks/Python.framework/Versions/3.5/ Then run make install_python_modules and then make pypi3_archive This should do the trick. Thanks Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2015-12-17 15:49 GMT+01:00 Daniele notifications@github.com:
|
Thanks, that went mostly well but I'd like to post a few issues I encountered and how I solved them. CMAKE = /usr/local/bin/cmake
ADD_PYTHON_INC = -I/usr/local/var/pyenv/versions/<yourversion>/include -I/usr/local/var/pyenv/versions/<yourversion>/lib \
-I/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m \
-I/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5
SWIG_PYTHON3_FLAG=-py3
UNIX_PYTHON_VER = 3.5 (cmake wasn't being found, no idea why), but I couldn't modify PYTHON_INC for some reason, possibly because the Makefile.unix is included later.
I ran them manually but they could be added to the Makefile, it makes the package easily removable with a simple
These went as expected.
Everything seems to work just fine.
are not in the gitignore file. |
I'm trying to install or-tools and having a pretty rough time. I'm on OS X 10.10.5. Let's start at https://developers.google.com/optimization/installing. First issue: Python 2.7 only, although later docs and GH issues point to py3-ortools. This should be mentioned up front so people grab the right package, and so Py3 users don't turn away preemptively. Next, I'm unable to find the PyPi package because it's built against El Capitan only. This is also missing from the docs. Step two in the docs links to Google.OrTools.python.examples. Let's install that. Nope, setup.py starts by installing or-tools from PyPi, which fails like above. Okay, let's grab the Google.OrTools.cc.MacOsX64.3393.tar.gz release from Github. Nope, no Python files. Let's build from source? Looks like we need
And now I'm more than an hour into trying to get this to work. Help? |
Hi Aris, I was able to install or-tools on OSX 10.10.5 without any problems:
Solution #0: value = 44, failures = 0, branches = 7,time = 6 ms Try following those steps and let us know if it works for you. Jon On Sun, Jan 10, 2016 at 12:49 AM, Aris Pikeas notifications@github.com
|
@orwant This is incorrect. I have just double-checked on a different machine, following your steps, and my install fails:
As I mentioned earlier, the examples file tries to install or-tools from PyPi. This fails on non-El Capitan systems by design (see @lperron's comment earlier in the thread). That's why I'm trying to build it from source, and building it from source is where things are failing. |
Hello @pikeas,
|
Major edit I figured out the problem. Here's the error I saw, even after upgrading to El Capitan:
I was stumped because this looks like an invalid shell script. However, after reviewing Makefile.unix, I added @mjfwest's suggestion from 1fbab49 and was able to move forward. So, #129 failed to find my homebrew-installed cmake. Please note that there are still a couple of issues which can hopefully be resolved at the package level:
|
Hi pip install does not work. py3-ortools is build for mac. For whatever reason, pypi decided it is a Please try installing the official cmake app from cmake And can you tell me the path to cmake from brew? I guess the script does Thanks Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2016-01-12 1:23 GMT-08:00 Aris Pikeas notifications@github.com:
|
@lperron |
Thanks Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2016-01-12 3:26 GMT-08:00 Martin West notifications@github.com:
|
Just had a chance to loop back this. Build fails at In a virtualenv:
And outside of virtualenv (homebrew-installed Python 3.5):
I can move past this by manually installing protobuf from the directory. But since protobuf can be installed via pip directly, I did that instead. I've been able to run a few examples, which also required modification - many of them use print as a statement and require google.apputils. I'm looking forward to finally using ortools, but the packaging/installation/documentation experience needs a lot of work. |
Which system are you on? I remember python install --user failing, there is a workaround somewhere Thanks Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2016-01-14 1:37 GMT+01:00 Aris Pikeas notifications@github.com:
|
Hello, I am using Debian Jessie and I see that or-tools is available here: https://pypi.python.org/pypi/py3-ortools and when I
I was wondering if this was a known issue or if I am doing something wrong because I was hoping to get ortools working in a virtualenv. Notably, I can get it installed and working by downloading the zip from the releases page and then:
But when I do it this way, I can only run it as root and I don't really like the idea of having to run programs like this as root. Is there something I am missing with the installation procedure? |
Hi, Debian and Ubuntu do not share the same GLIBC. Unfortunately, I cannot tell pypi to build 2 archives as it cannot What you can do:
I hope this helps Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2016-03-23 4:16 GMT+01:00 Eugene Kovalev notifications@github.com:
|
OK, thank you. I'm gonna try to get it working on Ubuntu, I just kind of casually assumed that Debian and Ubuntu would work the same way, but apparently that's not the case. Thank you for your help though! (and thanks for the Python3 support too) |
Notably I tried to build from source on Debian and I got as far as
|
Can you try removing line 315 (-rm ...) in makefiles/Makefile.python.mk ? Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 2016-03-23 20:58 GMT+01:00 Eugene Kovalev notifications@github.com:
|
It seems like the correct line to comment out (at least in the file I got was 287) but that got it working. (at least as far as running the golomb8.py example goes on Debian). Thank you! |
Installer exe doesnt work What really work? HEEELPPP |
We have just updated the installation documentation.
Can you check it?
https://developers.google.com/optimization/introduction/installing/binary
Thanks
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
2017-11-09 17:21 GMT+01:00 Abner Jonathan Del Cid Morales <
notifications@github.com>:
… Installer exe doesnt work
Bynari files installation doesnt work
Pip intstallation doesnt work
What really work? HEEELPPP
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#63 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKj17biIYZPhwH_xq5DF52R4nUfVIt7Fks5s0yaPgaJpZM4F2Zds>
.
|
Originally reported on Google Code with ID 47
Reported by
kermit666
on 2014-08-21 08:35:40The text was updated successfully, but these errors were encountered: