question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip 19.3 breaking on CircleCI `sys.exit(main()) TypeError: 'module' object is not callable`

See original GitHub issue

Environment

  • pip version: 19.2.3
  • Python version: 3.7
  • OS: Debian

More env details can be seen on CircleCI: https://circleci.com/gh/mne-tools/mne-python/16276?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link under the heading spin up environment, and the traceback of the fail under the heading get python running

Description

our CircleCI testing environment started failing today when running pip install --user --upgrade, presumably because of a not-clean upgrade from 19.2.3 (which comes in the docker image) to 19.3.

Expected behavior pip install --user --upgrade should work cleanly and not yield TypeError

Output

#!/bin/bash -eo pipefail
pip install --user --upgrade --progress-bar off pip numpy vtk
pip install --user --upgrade --progress-bar off -r requirements.txt
pip install --user --upgrade --progress-bar off ipython sphinx_fontawesome sphinx_bootstrap_theme "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler "https://api.github.com/repos/nipy/PySurfer/zipball/master"

Collecting pip
  Downloading https://files.pythonhosted.org/packages/4a/08/6ca123073af4ebc4c5488a5bc8a010ac57aa39ce4d3c8a931ad504de4185/pip-19.3-py2.py3-none-any.whl (1.4MB)

Collecting numpy
  Downloading https://files.pythonhosted.org/packages/ba/e0/46e2f0540370f2661b044647fa447fef2ecbcc8f7cdb4329ca2feb03fb23/numpy-1.17.2-cp37-cp37m-manylinux1_x86_64.whl (20.3MB)

Collecting vtk
  Downloading https://files.pythonhosted.org/packages/51/d3/48eb121c4375f7cb15f309a597cd1355198900cb9945dfaf593fca06173a/vtk-8.1.2-cp37-cp37m-manylinux1_x86_64.whl (48.9MB)

Installing collected packages: pip, numpy, vtk
Successfully installed numpy-1.17.2 pip-19.3 vtk-8.1.2
WARNING: You are using pip version 19.2.3, however version 19.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 10, in <module>
    sys.exit(main())
TypeError: 'module' object is not callable
Exited with code 1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
pfmoorecommented, Oct 14, 2019

The --user upgrade won’t have updated /usr/local/bin/pip, which will still expect to see the old version of pip. But the user install takes precedence, so what it sees is the new version.

You should either use python -m pip or use the wrapper script installed by the --user install (not sure where that gets installed, ~/.local/bin maybe?)

7reactions
drammockcommented, Oct 14, 2019

thanks @pfmoore. Using python -m pip seems to have fixed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip 19.3.1 TypeError: 'module' object is not callable
Try pip3 install --upgrade pip with root. pip version is actually 20.0.2. After that retry your command. Jeff.
Read more >
Build fails due to virtualenv failure - CircleCI Discuss
Complete output from command /home/ubuntu/virtual...2.7.13/bin/python2.7 - setuptools pip ... line 11, in <module> sys.exit(main()) File ...
Read more >
Intelligent Systems Engeneering - Digital Science Center
If such a system is not available to you can also use IU ... line 1, in <module>. # TypeError: 'set' object does...
Read more >
how to install express in console Code Example
Try 'apt --fix-broken install' with no packages (or specify a solution). ... file is not digitally signed you cannot run this script on...
Read more >
Two Scoops of Django: Best Practices for Django 1.8
Copyright c⃝ 2013-2015 Daniel Roy Greenfeld, Audrey Roy Greenfeld, and Two Scoops Press. All rights reserved. is book may not be reproduced in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found