ryan-roemer / django-cloud-browser

Django application browser for cloud datastores (Rackspace, AWS, etc.).
http://ryan-roemer.github.com/django-cloud-browser/
MIT License
81 stars 27 forks source link

Error when installing with pip #17

Closed mladeny closed 5 years ago

mladeny commented 6 years ago

Python version 3.6.3 pip version 10.0.1

I'm also in a python virtual env


  Using cached https://files.pythonhosted.org/packages/9f/b8/f3c67ddc85a35e65fae3cf8b0a43380e6259cac5c4698195b06ca4b46778/django-cloud-browser-0.4.0.tar.gz
Collecting distribute (from django-cloud-browser)
  Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/command/__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/setuptools/command/install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "/private/var/folders/3v/vg8ymhbd44q5h_wl1z6t_0m00000gn/T/pip-install-tp8o8d5y/distribute/pkg_resources.py", line 1518, in <module>
        register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'```
tweeks024 commented 6 years ago

Can reproduce as well

Python 3.6.4 pip 9.0.1 (tried upgrade to 10.0.1)

ryan-roemer commented 6 years ago

If it's something actually wrong with this lib, I'll take a PR that fixes it.

Did google this which may imply something with environment itself and not a given lib: https://stackoverflow.com/questions/42558133/upgrading-python3-4-to-python3-6-on-ubuntu-breaks-pip

tweeks024 commented 6 years ago

I found it installs fine normally with both python 2.7 and 3.5 and was eventually able to get it to install on 3.6 by using --no-deps since its failing when trying to install distribute. Pip actually says distribute is already installed if I run pip install --upgrade distribute but fails if I try pip install --force-reinstall distribute with the same error as above.

It looks like at least some other people have seen similar behavior with different packages. I'd guess removing the requirement would remove this behavior in 3.6 but not sure if that would cause issues for older version of python.

https://github.com/aspineux/pyzmail/pull/16

leewesleyv commented 5 years ago

Same problem on python 3.7.2.

I think the problem is that the dependency (Distribute) only supports up to python 3.3. https://pypi.org/project/distribute/

c-w commented 5 years ago

I've implemented a fix for this in https://github.com/ryan-roemer/django-cloud-browser/pull/18 which fixes the package install for me (Python 3.6.5, pip 9.0.3).