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

ImportError: No module named clint #187

Closed
rjollos opened this issue Jul 5, 2016 · 3 comments
Closed

ImportError: No module named clint #187

rjollos opened this issue Jul 5, 2016 · 3 comments

Comments

@rjollos
Copy link
Contributor

rjollos commented Jul 5, 2016

It seems that clint isn't being installed when installing with pip install twine. I've reproduced on Windows 7 with Python 2.7.11 and OSX with Python 2.7.12. pip install clint resolves the issue. The only thing I see that makes clint stand out from the other requirements is that a version isn't specified.

Issue is only seen when installing the wheel. Issue is not seen if installing using pip install --no-binary=twine twine.

(pve) ~/Documents/Workspace/sandbox$virtualenv pve
New python executable in /Users/rjollos/Documents/Workspace/sandbox/pve/bin/python2.7
Also creating executable in /Users/rjollos/Documents/Workspace/sandbox/pve/bin/python
Installing setuptools, pip, wheel...done.
(pve) ~/Documents/Workspace/sandbox$. pve/bin/activate
(pve) ~/Documents/Workspace/sandbox$pip install -U setuptools pip
Collecting setuptools
  Using cached setuptools-24.0.2-py2.py3-none-any.whl
Collecting pip
  Using cached pip-8.1.2-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
  Found existing installation: setuptools 19.6.2
    Uninstalling setuptools-19.6.2:
      Successfully uninstalled setuptools-19.6.2
  Found existing installation: pip 8.0.2
    Uninstalling pip-8.0.2:
      Successfully uninstalled pip-8.0.2
Successfully installed pip-8.1.2 setuptools-24.0.2
(pve) ~/Documents/Workspace/sandbox$pip install twine
Collecting twine
  Using cached twine-1.7.0-py2.py3-none-any.whl
Collecting requests>=2.3.0 (from twine)
  Using cached requests-2.10.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=0.7.0 in ./pve/lib/python2.7/site-packages (from twine)
Collecting pkginfo>=1.0 (from twine)
  Using cached pkginfo-1.3.2-py2.py3-none-any.whl
Collecting requests-toolbelt>=0.4.0 (from twine)
  Using cached requests_toolbelt-0.6.2-py2.py3-none-any.whl
Installing collected packages: requests, pkginfo, requests-toolbelt, twine
Successfully installed pkginfo-1.3.2 requests-2.10.0 requests-toolbelt-0.6.2 twine-1.7.0
(pve) ~/Documents/Workspace/sandbox$twine -h
Traceback (most recent call last):
  File "/Users/rjollos/Documents/Workspace/sandbox/pve/bin/twine", line 7, in <module>
    from twine.__main__ import main
  File "/Users/rjollos/Documents/Workspace/sandbox/pve/lib/python2.7/site-packages/twine/__main__.py", line 20, in <module>
    from twine.cli import dispatch
  File "/Users/rjollos/Documents/Workspace/sandbox/pve/lib/python2.7/site-packages/twine/cli.py", line 21, in <module>
    import clint
ImportError: No module named clint
@rjollos
Copy link
Contributor Author

rjollos commented Jul 5, 2016

Issue seems to be that [metadata] in setup.cfg overwrites install_requires in setup.py, and fails to include clint. There's a warning when creating the wheel.

$python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
installing to build/bdist.macosx-10.11-x86_64/wheel
running install
running install_lib
creating build/bdist.macosx-10.11-x86_64/wheel
creating build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/__init__.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/__main__.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/_installed.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/cli.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
creating build/bdist.macosx-10.11-x86_64/wheel/twine/commands
copying build/lib/twine/commands/__init__.py -> build/bdist.macosx-10.11-x86_64/wheel/twine/commands
copying build/lib/twine/commands/register.py -> build/bdist.macosx-10.11-x86_64/wheel/twine/commands
copying build/lib/twine/commands/upload.py -> build/bdist.macosx-10.11-x86_64/wheel/twine/commands
copying build/lib/twine/exceptions.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/package.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/repository.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/utils.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/wheel.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
copying build/lib/twine/wininst.py -> build/bdist.macosx-10.11-x86_64/wheel/twine
running install_egg_info
running egg_info
writing requirements to twine.egg-info/requires.txt
writing twine.egg-info/PKG-INFO
writing top-level names to twine.egg-info/top_level.txt
writing dependency_links to twine.egg-info/dependency_links.txt
writing entry points to twine.egg-info/entry_points.txt
reading manifest file 'twine.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'twine.egg-info/SOURCES.txt'
Copying twine.egg-info to build/bdist.macosx-10.11-x86_64/wheel/twine-1.7.0-py2.7.egg-info
running install_scripts
/Users/rjollos/Documents/Workspace/sandbox/pve/lib/python2.7/site-packages/wheel/bdist_wheel.py:330: UserWarning: setup.cfg requirements overwrite values from setup.py
  warnings.warn('setup.cfg requirements overwrite values from setup.py')
creating build/bdist.macosx-10.11-x86_64/wheel/twine-1.7.0.dist-info/WHEEL

@rjollos
Copy link
Contributor Author

rjollos commented Jul 5, 2016

I created a pull request, but maybe more could be done to eliminate the redundant requirements specification.

mojeto added a commit to mojeto/django-in-request-cache that referenced this issue Jul 5, 2016
@sigmavirus24
Copy link
Member

Thanks @rjollos. 1.7.1 is released with this fix.

@dstufft dstufft closed this as completed Jul 5, 2016
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

No branches or pull requests

3 participants