Skip to content

bootstrap-ponyd.py fails at setuptools install #198

Open

Description

@zettlunic

Hi there. I tried to install ponyd on my mac but the script seems to fail while installing setuptools. I tried to install setuptools manually via pip or easy_install, both worked but didn't fix the issue.
I'm using homebrew's python 2.7.13 on macOS 10.12.2

Thanks in advance.

marcels-mbp:Downloads marcel$ curl -s https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger
New python executable in /Users/marcel/Library/PonyDebugger/bin/python2.7
Not overwriting existing python script /Users/marcel/Library/PonyDebugger/bin/python (you must use /Users/marcel/Library/PonyDebugger/bin/python2.7)
Installing setuptools..........................................
  Complete output from command /Users/marcel/Librar...bugger/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])






" --always-copy -U setuptools:
  Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
Searching for setuptools
Reading http://pypi.python.org/simple/setuptools/
Best match: setuptools 33.1.1
Downloading https://pypi.python.org/packages/dc/8c/7c9869454bdc53e72fb87ace63eac39336879eef6f2bf96e946edbf03e90/setuptools-33.1.1.zip#md5=7963d41d97b94e450e3f8a217be06ffe
Processing setuptools-33.1.1.zip
Running setuptools-33.1.1/setup.py -q bdist_egg --dist-dir /var/folders/mk/m88t169s3kd9pqw735_2wd7r0000gp/T/easy_install-GW0gfl/setuptools-33.1.1/egg-dist-tmp-8BN1Ev
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'src_root'
  warnings.warn(msg)
Traceback (most recent call last):
  File "<string>", line 279, in <module>
  File "<string>", line 214, in main
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 446, in easy_install
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 476, in install_item
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 655, in install_eggs
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 930, in build_and_install
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 919, in run_setup
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 62, in run_setup
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 105, in run
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/sandbox.py", line 64, in <lambda>
  File "setup.py", line 181, in <module>
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 264, in __init__
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 297, in finalize_options
  File "/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1959, in load
ImportError: <module 'setuptools.dist' from '/Users/marcel/Downloads/setuptools-0.6c11-py2.7.egg/setuptools/dist.py'> has no 'check_specifier' attribute
----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
  File "<stdin>", line 2462, in <module>
  File "<stdin>", line 944, in main
  File "<stdin>", line 1054, in create_environment
  File "<stdin>", line 600, in install_setuptools
  File "<stdin>", line 572, in _install_req
  File "<stdin>", line 1022, in call_subprocess
OSError: Command /Users/marcel/Librar...bugger/bin/python2.7 -c "#!python
\"\"\"Bootstra...sys.argv[1:])






" --always-copy -U setuptools failed with error code 1

Activity

  1. changed the title [-]bootstrap-ponyd.py is failing at `setuptools` install[/-] [+]bootstrap-ponyd.py fails at `setuptools` install[/+] on Jan 20, 2017
  2. changed the title [-]bootstrap-ponyd.py fails at `setuptools` install[/-] [+]bootstrap-ponyd.py fails at setuptools install[/+] on Jan 20, 2017
  3. ebaujard commented on Feb 7, 2017

    @ebaujard

    I encounter the same issue.
    ProductName: Mac OS X
    ProductVersion: 10.12.3
    Python: 2.7.10

  4. nextgeniuspro commented on Feb 10, 2017

    @nextgeniuspro

    Installation of ponyd is a mess, I've fixed it with next steps:

    1. Create directory ponyd and move to it
    mkdir ponyd
    cd ponyd
    
    1. Download required dependencies to this directory
    curl -O https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz
    curl -O https://pypi.python.org/packages/25/5d/cc55d39ac39383dd6e04ae80501b9af3cc455be64740ad68a4e12ec81b00/setuptools-0.6c11-py2.7.egg
    curl -O https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pybonjour/pybonjour-1.1.1.tar.gz
    tar xvf pybonjour-1.1.1.tar.gz
    mv pybonjour-1.1.1 pybonjour
    
    1. Download bootstrap-ponyd.py
      curl -O https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py
    2. Add command to install pybonjour to bootstrap-ponyd.py
      subprocess.check_call([join(home_dir, 'bin', 'python'), join('pybonjour', 'setup.py'), 'install'])
      ex.:
    def after_install(options, home_dir):
        subprocess.check_call([join(home_dir, 'bin', 'python'),  join('pybonjour', 'setup.py'), 'install'])
    
        subprocess.check_call([join(home_dir, 'bin', 'pip'),
                         'install', '-U', '-e', 'git+https://github.com/square/PonyDebugger.git#egg=ponydebugger'])
    
    1. Run installation from patched bootstrap
      cat ./bootstrap-ponyd.py | python - --never-download --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger
    2. Installation will fall with error, because some packages won't be found, fix them by next commands:
    ~/Library/PonyDebugger/bin/easy_install --find-links https://pypi.python.org/simple/backports-abc/ -U backports_abc
    ~/Library/PonyDebugger/bin/easy_install --find-links https://pypi.python.org/simple/certifi -U certifi
    ~/Library/PonyDebugger/bin/easy_install --find-links https://pypi.python.org/simple/six/ -U six
    sudo ~/Library/PonyDebugger/bin/easy_install -U pybonjour
    
    1. And installing devtools
      ponyd update-devtools
  5. rcorrie commented on Feb 14, 2017

    @rcorrie

    @yevgeniy-logachev tried your solution, but I get this error on step 7

    Traceback (most recent call last):
      File "/usr/local/bin/ponyd", line 8, in <module>
        load_entry_point('ponyd==1.0', 'console_scripts', 'ponyd')()
      File "build/bdist.linux-i686/egg/pkg_resources.py", line 318, in load_entry_point
      File "build/bdist.linux-i686/egg/pkg_resources.py", line 2221, in load_entry_point
      File "build/bdist.linux-i686/egg/pkg_resources.py", line 1954, in load
      File "/Users/****/Library/PonyDebugger/src/ponydebugger/ponyd/__init__.py", line 4, in <module>
        import gateway
      File "/Users/****/Library/PonyDebugger/src/ponydebugger/ponyd/gateway.py", line 19, in <module>
        import bonjour
      File "/Users/****/Library/PonyDebugger/src/ponydebugger/ponyd/bonjour.py", line 3, in <module>
        import pybonjour
    ImportError: No module named pybonjour
    
  6. nextgeniuspro commented on Feb 14, 2017

    @nextgeniuspro

    @rcorrie, I found issue and fixed some steps above. Please remove content of your ~/Library/PonyDebugger/ direcory and try all these steps again

  7. zettlunic commented on Feb 16, 2017

    @zettlunic
    Author

    @yevgeniy-logachev thank you, I will give it a shot today.

  8. CoderZbf commented on Mar 6, 2017

    @CoderZbf

    @yevgeniy-logachev Hello, I would like to ask you what is the meaning of the first four steps I do not quite understand what to say thank you

  9. roblav96 commented on Apr 18, 2017

    @roblav96

    @yevgeniy-logachev Your solution works great =]

  10. diegomazzone commented on Jun 23, 2017

    @diegomazzone

    @yevgeniy-logachev you made my day!

  11. rivalnhwc commented on Aug 28, 2017

    @rivalnhwc

    @yevgeniy-logachev thank you!

  12. gentoo-pl commented on Oct 31, 2017

    @gentoo-pl

    I still have problem with installation. I tried with @yevgeniy-logachev instructions, but have problem with 6th step. Only pybonjour have successfully installed.

    Searching for backports-abc
    Reading http://pypi.python.org/simple/backports_abc/
    Reading http://pypi.python.org/simple/backports-abc/
    Couldn't find index page for 'backports_abc' (maybe misspelled?)
    Scanning index of all packages (this may take a while)
    Reading http://pypi.python.org/simple/
    No local packages or download links found for backports-abc
    Best match: None
    Traceback (most recent call last):
      File "/Users/herman/Library/PonyDebugger/bin/easy_install", line 8, in <module>
        load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 434, in easy_install
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/package_index.py", line 475, in fetch_distribution
    AttributeError: 'NoneType' object has no attribute 'clone'
    Searching for certifi
    Reading http://pypi.python.org/simple/certifi/
    Couldn't find index page for 'certifi' (maybe misspelled?)
    Scanning index of all packages (this may take a while)
    Reading http://pypi.python.org/simple/
    No local packages or download links found for certifi
    Best match: None
    Traceback (most recent call last):
      File "/Users/herman/Library/PonyDebugger/bin/easy_install", line 8, in <module>
        load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 434, in easy_install
      File "/Users/herman/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/package_index.py", line 475, in fetch_distribution
    AttributeError: 'NoneType' object has no attribute 'clone'
    

    I tried instruction from here #188 (comment)
    but after install and start ponyd server I always have 404 status code.

  13. firstim commented on Nov 7, 2017

    @firstim

    Having exactly error as @gentoo-pl said:

    AttributeError: 'NoneType' object has no attribute 'clone'

    Any idea? @yevgeniy-logachev Thanks!
    Env:
    MacOS 10.12.6
    Python 2.7.10

  14. nextgeniuspro commented on Nov 17, 2017

    @nextgeniuspro

    I updated step 6, if you have errors like:

    _AttributeError: 'NoneType' object has no attribute 'clone'_

    use these actions in step 6
    cmd$ ~/Library/PonyDebugger/bin/easy_install --find-links https://pypi.python.org/simple/backports-abc/ -U backports_abc
    cmd$ ~/Library/PonyDebugger/bin/easy_install --find-links https://pypi.python.org/simple/certifi -U certifi
    cmd$ ~/Library/PonyDebugger/bin/easy_install --find-links https://pypi.python.org/simple/six/ -U six
    cmd$ sudo ~/Library/PonyDebugger/bin/easy_install -U pybonjour

  15. methodiva commented on Nov 19, 2017

    @methodiva

    For others coming here, I encountered this when I did ponyd update-devtools in the end:

    ponyd update-devtools
    Traceback (most recent call last):
      File "/usr/local/bin/ponyd", line 5, in <module>
        from pkg_resources import load_entry_point
      File "/Users/jyoti/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2603, in <module>
      File "/Users/jyoti/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 666, in require
      File "/Users/jyoti/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
    pkg_resources.DistributionNotFound: singledispatch
    

    which i fixed by doing

    ~/Library/PonyDebugger/bin/easy_install --find-links https://pypi.python.org/simple/singledispatch/ -U singledispatch
    

    and then running ponyd update-devtools again

  16. firstim commented on Nov 19, 2017

    @firstim

    @methodiva that is awesome.

  17. added
    ponydIssues affecting the `ponyd` python server
    on Jul 3, 2018
  18. bluekurk commented on Aug 31, 2018

    @bluekurk

    @yevgeniy-logachev little update:
    step 2: add -L to fix "301 Moved Permanently" redirect issue, or just download them manually.
    curl -O -L https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz
    curl -O -L https://pypi.python.org/packages/25/5d/cc55d39ac39383dd6e04ae80501b9af3cc455be64740ad68a4e12ec81b00/setuptools-0.6c11-py2.7.egg
    step 3: remove "cloud" subdomain
    curl -O -L https://github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py

    and, thanks for your info.

  19. jbarros35 commented on Dec 13, 2019

    @jbarros35

    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: cloud.github.com

  20. deependrag commented on Mar 5, 2020

    @deependrag

    @yevgeniy-logachev
    I encountered this when I did ponyd update-devtools in the end

    Traceback (most recent call last): File "/usr/local/bin/ponyd", line 5, in <module> from pkg_resources import load_entry_point File "/Users/deepbhai/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2603, in <module> File "/Users/deepbhai/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 666, in require File "/Users/deepbhai/Library/PonyDebugger/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve pkg_resources.DistributionNotFound: futures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ponydIssues affecting the `ponyd` python server

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions