torrvision / crayon

A language-agnostic interface to TensorBoard
MIT License
779 stars 59 forks source link

Install fails unless requests is already installed #24

Closed elistevens closed 7 years ago

elistevens commented 7 years ago

This is under a python 3 venv:

$ .venv/bin/pip install pycrayon
Collecting pycrayon
  Downloading pycrayon-0.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-4hvqb18r/pycrayon/setup.py", line 2, in <module>
        from pycrayon.crayon import __version__
      File "/tmp/pip-build-4hvqb18r/pycrayon/pycrayon/__init__.py", line 1, in <module>
        from .crayon import CrayonClient
      File "/tmp/pip-build-4hvqb18r/pycrayon/pycrayon/crayon.py", line 1, in <module>
        import requests
    ImportError: No module named 'requests'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4hvqb18r/pycrayon/

$ .venv/bin/pip install requests pycrayon
Collecting requests
  Downloading requests-2.13.0-py2.py3-none-any.whl (584kB)
    100% |████████████████████████████████| 593kB 2.3MB/s 
Collecting pycrayon
  Using cached pycrayon-0.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-xyawjvaw/pycrayon/setup.py", line 2, in <module>
        from pycrayon.crayon import __version__
      File "/tmp/pip-build-xyawjvaw/pycrayon/pycrayon/__init__.py", line 1, in <module>
        from .crayon import CrayonClient
      File "/tmp/pip-build-xyawjvaw/pycrayon/pycrayon/crayon.py", line 1, in <module>
        import requests
    ImportError: No module named 'requests'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xyawjvaw/pycrayon/

$ .venv/bin/pip install requests 
Collecting requests
  Using cached requests-2.13.0-py2.py3-none-any.whl
Installing collected packages: requests
Successfully installed requests-2.13.0

$ .venv/bin/pip install pycrayon
Collecting pycrayon
  Using cached pycrayon-0.5.tar.gz
Requirement already satisfied: requests in ./.venv/lib/python3.5/site-packages (from pycrayon)
Building wheels for collected packages: pycrayon
  Running setup.py bdist_wheel for pycrayon ... done
  Stored in directory: /home/elis/.cache/pip/wheels/f2/39/f0/b7168e93688c8d36ffaae3c0ca5a9a928c5173d01baf69aeff
Successfully built pycrayon
Installing collected packages: pycrayon
Successfully installed pycrayon-0.5
albanD commented 7 years ago

Hi, Thanks for reporting the problem. I think it comes from the fact that we currently use distutils to package everything and that does not install missing dependencies. We will switch to setuptools for the next release which should fix the issue.

obust commented 7 years ago

From the time being this step should really be added to the README file.