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

choose to install with pip2 or pip3 #542

Closed

Conversation

willcbaker
Copy link

Fixes #519

Can't run tests, all tests fail on my machine (even on master), not sure what is required to run nosetests (documentation definitely needs updating)

but should work with some test rosdepkey:

python-coverage:
  ubuntu:
    pip:
      packages: [coverage]

python2-coverage:
  ubuntu:
    pip2:
      packages: [coverage]

python3-coverage:
  ubuntu:
    pip3:
      packages: [coverage]

@tfoote
Copy link
Member

tfoote commented Aug 18, 2017

This looks interesting. Since we have side by side installations of the debian python packages it makes sense to support both variants of python via pip.

Does it make sense to support both pip2 and pip3 as well as keep the generic pip. Clearly we'd need a backwards compatibility but since we're assuming pip is python2 almost implicitly then maybe we should just use that and have pip3 as the explicit new installer.

I'd like to think a little bit about the implications with respect to systems that may or may not have python2 or python3. The installers should probably check and assert/fail with a useful error message. (And they should also make sure that the version of pip they are running is the right version)

There are some systems that have only python3 or only python2 installed. Arch is the primary example, where they've switched the default to python3. How should this react there? Just assert they can't install python2 packages?

And we'll need to make sure to apply this to all the target platforms not just ubuntu and debian.

@emersonknapp
Copy link

emersonknapp commented Sep 16, 2019

@tfoote woo this one's been dormant for a long time. I'm interested in this as well, I was attempting to add a rule for https://pypi.org/project/docker/ for python3 and found this - do you remember if you thought further about what we should do?

EDIT: resolving to make the older apt version work for us instead for all our sanity, but still interested in if there has been further thinking about this topic.

since we're assuming pip is python2 almost implicitly then maybe we should just use that and have pip3 as the explicit new installer

I'm inclined to agree with this choice of convention. We'd just need to update the CONTRIBUTING doc to reflect it.

There are some systems that have only python3 or only python2 installed. Arch is the primary example, where they've switched the default to python3. How should this react there? Just assert they can't install python2 packages?

Also yes, I think, just give an error message if they don't have the correct Python version available.

@sloretz
Copy link
Contributor

sloretz commented Sep 23, 2019

Related section in ros-infrastructure/rep#201 a proposal for Python 3 support is ROS 1 : https://github.com/ros-infrastructure/rep/pull/201/files#diff-2ae0c7c945887a83beec61fed2c78e8bR113

@tfoote
Copy link
Member

tfoote commented Sep 25, 2019

Thanks for pinging this back. As we've evolved I think that leveraging the ROS_PYTHON_VERSION from the REP will be a better approach. Although this approach is more specific it will cause more overhead for maintaining the rules. And if we're going to have separate keys anyway the python version is somewhat implicitly encoded.

@nuclearsandwich
Copy link
Contributor

#709 has been released which uses the ROS_PYTHON_VERSION as discussed above so I'm going to close this PR.

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.

Can't choose whether or not to install pip2 or pip3 version of pip package
5 participants