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

Switch to using python3 #158

Closed
clalancette opened this issue Dec 5, 2017 · 15 comments
Closed

Switch to using python3 #158

clalancette opened this issue Dec 5, 2017 · 15 comments

Comments

@clalancette
Copy link
Contributor

We are currently using python2 both for the launchers and for the python bindings. We eventually want to move to using python3, but this is blocked on the fact that LCM as compiled by drake only compiles for python2.7. Once we remove all of the bridge from delphyne, we don't need LCM anymore and we can then switch to python3.

@basicNew
Copy link

@EricCousineau-TRI qq: do you know if the pybind11 fork works with python 3? Any comments / warnings are more than welcome.

@stonier
Copy link
Collaborator

stonier commented Mar 12, 2018

@EricCousineau-TRI, also interested in this question for TRI driving, since it defaults to python3.

@EricCousineau-TRI
Copy link
Contributor

EricCousineau-TRI commented Mar 12, 2018

Our pybind11 fork is tested for Python3 on Ubuntu for GCC and Clang (and Mac, but not Windows, but that seems irrelevant at this point).
An example TravisCI build, from RobotLocomotion/pybind11#11:
https://travis-ci.org/RobotLocomotion/pybind11/builds/345471530

Once we remove all of the bridge from delphyne, we don't need LCM anymore and we can then switch to python3.

At present, Drake is only built for Python2.7, so if you're using pydrake, then there will be more blocking items. Will you be using pydrake in your fork, or re-binding classes?
If you wish to still use pydrake, then we should file an upstream issue; it may be relevant to smoothing over some of the silliness that's happening with Mac + Homebrew.

@stonier
Copy link
Collaborator

stonier commented Mar 13, 2018

Unfortunately we're all far too dour and serious. No Mac silliness here ....

@stonier
Copy link
Collaborator

stonier commented Mar 13, 2018

Python 2.7 for us is fine, for now. I'll let the TRI driving sim team entertain themselves with python3 / maliput bindings / pydrake and identify the issues for us.

@EricCousineau-TRI
Copy link
Contributor

Sounds good.

I've realized that I haven't seen any issues regarding Python3 in Drake issues, so I made a quick one here:
RobotLocomotion/drake#8352

@basicNew basicNew mentioned this issue Apr 24, 2018
9 tasks
@stonier stonier added this to the Milestone #3 milestone Apr 25, 2018
@stonier
Copy link
Collaborator

stonier commented Sep 18, 2018

Subsumed by #544.

@stonier stonier closed this as completed Sep 18, 2018
@stonier stonier modified the milestones: Milestone #3, Backlog Sep 18, 2018
@clalancette
Copy link
Contributor Author

We'd like to get this into Milestone 3, now that the Drake side is working.

@clalancette clalancette reopened this Feb 1, 2019
@clalancette clalancette modified the milestones: Backlog, Milestone #3 Feb 1, 2019
@stonier
Copy link
Collaborator

stonier commented Feb 1, 2019

Drake documentation re python3: https://drake.mit.edu/bazel.html#python-versions

Not sure if they have a fetchable tarball for a python3 build yet though. We'll need to either fetch that or build it and save it ourselves.

@EricCousineau-TRI
Copy link
Contributor

EricCousineau-TRI commented Feb 1, 2019

Not yet, but should have one next week:
RobotLocomotion/drake#10408 (comment)

Also, CMake building:
https://drake.mit.edu/python_bindings.html#building-the-python-bindings

@basicNew
Copy link

basicNew commented Feb 7, 2019

Thanks for the pointer @EricCousineau-TRI ! Just to confirm, bazel run --config=python3 //:install <target_path> should to the trick for the installation part, right?

@EricCousineau-TRI
Copy link
Contributor

Yup! You'll just need to make sure you run:

./setup/ubuntu/source_distribution/install_prereqs_user_environment.sh

first so it can symlink in the right platform. Note that Python 3 is only supported on Bionic.

@basicNew
Copy link

basicNew commented Feb 7, 2019

Ah, thanks for that @EricCousineau-TRI !

@clalancette
Copy link
Contributor Author

This was completed by @basicNew and @hidmic in #583 and maliput/delphyne_gui#179 . @stonier would you like to pull the latest and check so we can close this issue (and thus close out Milestone 3)?

@basicNew
Copy link

Done, closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants