Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Remove pip upgrade step from install docs #10587

Merged
merged 5 commits into from
Apr 18, 2018

Conversation

anirudh2290
Copy link
Member

@anirudh2290 anirudh2290 commented Apr 17, 2018

Description

It is not advised to upgrade a system pip package(install with debian package manager for example) to be upgraded by doing pip install -U pip (pypa/pip#5221). I don't think we need this upgrade step here since MXNet installs fine with the pip version that is available after doing sudo apt-get install python-pip. Please see the PIP upgrade issue: pypa/pip#5221 . We ran into this issue when running the nightly tests.
Removed the upgrade step in this PR.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@anirudh2290 anirudh2290 requested a review from szha as a code owner April 17, 2018 23:01
@anirudh2290
Copy link
Member Author

@mbaijal @gautamkmr @marcoabreu can you please take a look ?

@anirudh2290
Copy link
Member Author

@cjolivier01 @reminisce can you also please help review ?

@mbaijal
Copy link
Contributor

mbaijal commented Apr 18, 2018

@anirudh2290 The test still fails on nightly when i run it on your local branch.
I think you removed the step only from the cpu instructions, the test actually fails on the gpu version (line 479)

@szha
Copy link
Member

szha commented Apr 18, 2018

After the pip 10 update, for some users it's actually recommended/mendatory to upgrade, see https://pypi.org/help/#tls-deprecation

@mbaijal
Copy link
Contributor

mbaijal commented Apr 18, 2018

After the GPU fix, the nightly test passes.

@anirudh2290
Copy link
Member Author

The issue is that installing pip with debian package manager (sudo apt-get install python-pip) and then upgrading with pip package manager(pip install --upgrade pip) is not recommended. Currently, on ubuntu 16.04 doing this breaks pip.
There is no problem with upgrading to pip 10 if that is done with the same package manager that you installed pip with.
Also, for the tls issue, I think upgrading python should suffice.

Copy link

@gsemet gsemet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. You can do it if you specify —user and have .local/bin in you path. It is the safest and recommended way of maintaining an up to date pip for the user while not breaking system’s pip

@anirudh2290
Copy link
Member Author

anirudh2290 commented Apr 18, 2018

@gsemet Thanks for your inputs. Even with the --user flag the system pip breaks on Ubuntu 16.04:

$ pip install --upgrade pip --user
$ pip -v
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main
$ /usr/bin/pip -v
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main
$ echo $PATH
/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Since, the upgrade to pip doesn't seem to be required (unless there is a counter use case that i am not aware of), we can just omit the upgrade step here.

@gsemet
Copy link

gsemet commented Apr 18, 2018

what does which pip returns? You need to ensure you have ~/.local/bin in your PATH

@anirudh2290
Copy link
Member Author

anirudh2290 commented Apr 18, 2018 via email

@cjolivier01 cjolivier01 merged commit 869b156 into apache:master Apr 18, 2018
anirudh2290 added a commit to anirudh2290/mxnet that referenced this pull request Apr 18, 2018
* Remove pip upgrade step

* Trigger CI

* Fix for GPU too

* Trigger CI
eric-haibin-lin pushed a commit that referenced this pull request Apr 18, 2018
* Remove pip upgrade step

* Trigger CI

* Fix for GPU too

* Trigger CI
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
* Remove pip upgrade step

* Trigger CI

* Fix for GPU too

* Trigger CI
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
* Remove pip upgrade step

* Trigger CI

* Fix for GPU too

* Trigger CI
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants