This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: pip needs ctypes
Type: Stage:
Components: Demos and Tools, Library (Lib) Versions: Python 3.4, Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Marcus.Smith, dstufft, ncoghlan, paul.moore, pitrou
Priority: normal Keywords:

Created on 2014-10-11 16:33 by pitrou, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg229093 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-10-11 16:33
I think a bit weird that pip needs ctypes inconditionally. Note the following traceback is on an Unix platform and ctypes seems imported by a... win32 shell coloring library!

FAIL: test_with_pip (test.test_venv.EnsurePipTest)
Traceback (most recent call last):
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/", line 356, in test_with_pip
subprocess.CalledProcessError: Command '['/tmp/tmppsirrkh8/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/", line 362, in test_with_pip, details))
AssertionError: Command '['/tmp/tmppsirrkh8/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

**Subprocess Output**
Traceback (most recent call last):
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/", line 85, in _run_code
    exec(code, run_globals)
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/ensurepip/", line 4, in <module>
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/ensurepip/", line 209, in _main
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/ensurepip/", line 116, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/ensurepip/", line 40, in _run_pip
    import pip
  File "/tmp/tmpvhf7jjwp/pip-1.5.6-py2.py3-none-any.whl/pip/", line 9, in <module>
  File "/tmp/tmpvhf7jjwp/pip-1.5.6-py2.py3-none-any.whl/pip/", line 9, in <module>
  File "/tmp/tmpvhf7jjwp/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/", line 2, in <module>
  File "/tmp/tmpvhf7jjwp/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/", line 5, in <module>
  File "/tmp/tmpvhf7jjwp/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/", line 6, in <module>
  File "/tmp/tmpvhf7jjwp/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/", line 2, in <module>
  File "/tmp/tmpvhf7jjwp/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/", line 7, in <module>
  File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/ctypes/", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: No module named '_ctypes'

msg229094 - (view) Author: Donald Stufft (dstufft) * (Python committer) Date: 2014-10-11 16:35
This is no longer the case in the next version of pip.
Date User Action Args
2022-04-11 14:58:09adminsetgithub: 66801
2014-10-19 06:02:04terry.reedyunlinkissue22669 superseder
2014-10-19 01:05:00ned.deilylinkissue22669 superseder
2014-10-11 16:35:07dstufftsetstatus: open -> closed
resolution: fixed
messages: + msg229094
2014-10-11 16:33:59pitroucreate