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

setuptools: ModuleNotFoundError: No module named 'six' #964

Closed
0-wiz-0 opened this issue Feb 7, 2017 · 7 comments
Closed

setuptools: ModuleNotFoundError: No module named 'six' #964

0-wiz-0 opened this issue Feb 7, 2017 · 7 comments
Labels

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Feb 7, 2017

Building setuptools in the standard way I've used forever fails:

# /usr/pkg/bin/python3.6  setup.py  build
Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    import setuptools
  File ".../setuptools-34.1.1/setuptools/__init__.py", line 10, in <module>
    from six.moves import filter, map
ModuleNotFoundError: No module named 'six'

It looks like setuptools now added a six dependency, which breaks distributions that build from scratch, because six uses setuptools for installation (dependency cycle).

@jaraco jaraco added the invalid label Feb 7, 2017
@jaraco
Copy link
Member

jaraco commented Feb 7, 2017

That's right. This change was made intentionally as part of the Setuptools 34 release - dropping support for self install and upgrade. We've removed the hack that vendors setuptools dependencies. You'll want to install the dependencies with pip first. See bootstrap.py for one technique for installing the dependencies.

@jaraco jaraco closed this as completed Feb 7, 2017
@0-wiz-0
Copy link
Author

0-wiz-0 commented Feb 7, 2017

I'm sorry if I'm slow to understand, but I have more questions. I don't see bootstrap.py documented, and reading it, it imports pip. pip also needs setuptools to install.

What is the recommended packaging procedure if you only have python installed to get to packages for pip and setuptools?

And to make it absolutely clear, I'm not asking for end-user instructions, but for packaging instructions, i.e. a way to come up with binary packages for users when building from scratch without using prepackaged binaries.

@0-wiz-0
Copy link
Author

0-wiz-0 commented Feb 8, 2017

For anyone else stumbling over this issue, my solution was:

  • install the setuptools version that is coming with python, using python -m ensurepip --user
  • build and install appdirs, six, pyparsing, and packaging with this version
  • build setuptools
  • delete the --user installation of the old version

muzaffaryousaf pushed a commit to openedx/xblock-lti-consumer that referenced this issue Apr 18, 2017
muzaffaryousaf pushed a commit to openedx/xblock-lti-consumer that referenced this issue Apr 18, 2017
Qubad786 pushed a commit to openedx/xblock-lti-consumer that referenced this issue Apr 18, 2017
@maxguxiao
Copy link

I got the same problem after I upgrade python2.7.10 to python2.7.13.

None of the above works for me.
Finally, I fixed this by download six package directly from pypi,
then go to the download directory,
and manually installed it by using python set-up.py install.

EnTeQuAk added a commit to mozilla/addons-server that referenced this issue Jun 1, 2017
See pypa/setuptools#964 for a few more details. Currently quite a few
travis and circleci jobs are failing because of that.
EnTeQuAk added a commit to mozilla/addons-server that referenced this issue Jun 1, 2017
* Install six before we upgrade setuptools.

See pypa/setuptools#964 for a few more details. Currently quite a few
travis and circleci jobs are failing because of that.

* Explicitly upgrade pip and setuptools in 'make update_deps' so for travis too.

* Potentially fix circleci

* Fix setuptools and potentially docs environments

* More explicitly install six and setuptools

* Add more requirements for docs

* Add pyparsing dependency
@Kentzo
Copy link
Contributor

Kentzo commented Jun 2, 2017

I wish that dependency would be lifted when Python 3 is being used.

@jaraco
Copy link
Member

jaraco commented Jun 4, 2017

That dependency will be lifted when Python 2.7 support is dropped. Until then, six is the library that enables a unified codebase for all versions.

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

No branches or pull requests

4 participants