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

Install tractor failed #370

Closed
allrobot opened this issue Jun 5, 2024 · 2 comments
Closed

Install tractor failed #370

allrobot opened this issue Jun 5, 2024 · 2 comments

Comments

@allrobot
Copy link

allrobot commented Jun 5, 2024

C:\Users\Administrator\Personal_scripts\Python\PythonScripts\tools\aria2>pip install tractor
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tractor
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/20/a4/10f84b3003768c8880f8ca848a0b87f0324f5d94960dcd2b1d1aee8bacb8/tractor-0.1.0a5.tar.gz (106 kB)
     ---------------------------------------- 106.7/106.7 kB 1.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pdbpp@ git+https://github.com/pdbpp/pdbpp@76c4be5#egg=pdbpp (from tractor)
  Cloning https://github.com/pdbpp/pdbpp (to revision 76c4be5) to c:\users\administrator\appdata\local\temp\pip-install-q6jy3qzf\pdbpp_233f6365b13f44288a1b65d8c73e2287
  Running command git clone --filter=blob:none --quiet https://github.com/pdbpp/pdbpp 'C:\Users\Administrator\AppData\Local\Temp\pip-install-q6jy3qzf\pdbpp_233f6365b13f44288a1b65d8c73e2287'
  fatal: unable to access 'https://github.com/pdbpp/pdbpp/': Failed to connect to github.com port 443 after 21081 ms: Timed out
  error: subprocess-exited-with-error

  × git clone --filter=blob:none --quiet https://github.com/pdbpp/pdbpp 'C:\Users\Administrator\AppData\Local\Temp\pip-install-q6jy3qzf\pdbpp_233f6365b13f44288a1b65d8c73e2287' did not run successfully.
  │ exit code: 128
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/pdbpp/pdbpp 'C:\Users\Administrator\AppData\Local\Temp\pip-install-q6jy3qzf\pdbpp_233f6365b13f44288a1b65d8c73e2287' did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Can the GitHub source be changed to a Python pip source? exmaplepip install pdbpp

I can normally use git clone xxxxx here, but I don't know why there was an error in the execution.

I must manually download and install the source code.

pip install pdbpp # or pip install pdbp
git clone https://github.com/goodboy/tractor.git
cd tractor
setup.py install

but run code, it will report error:

"""
Run with a process monitor from a terminal using::

    $TERM -e watch -n 0.1  "pstree -a $$" \
        & python examples/parallelism/single_func.py \
        && kill $!

"""
import os

import tractor
import trio


async def burn_cpu():

    pid = os.getpid()

    # burn a core @ ~ 50kHz
    for _ in range(50000):
        await trio.sleep(1/50000/50)

    return os.getpid()


async def main():

    async with tractor.open_nursery() as n:

        portal = await n.run_in_actor(burn_cpu)

        #  burn rubber in the parent too
        await burn_cpu()

        # wait on result from target function
        pid = await portal.result()

    # end of nursery block
    print(f"Collected subproc {pid}")


if __name__ == '__main__':
    trio.run(main)

REPORT

C:\ProgramData\anaconda3\envs\python311\python.exe C:\Users\Administrator\Personal_scripts\pythonProject\test.py 
Traceback (most recent call last):
  File "C:\Users\Administrator\Personal_scripts\pythonProject\test.py", line 11, in <module>
    import tractor
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\tractor-0.1.0a6.dev0-py3.11.egg\tractor\__init__.py", line 37, in <module>
    from ._supervise import open_nursery
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\tractor-0.1.0a6.dev0-py3.11.egg\tractor\_supervise.py", line 34, in <module>
    from ._debug import maybe_wait_for_debugger
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\tractor-0.1.0a6.dev0-py3.11.egg\tractor\_debug.py", line 40, in <module>
    import pdbp
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\pdbp.py", line 19, in <module>
    from tabcompleter import Completer, ConfigurableClass, Color
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\tabcompleter.py", line 5, in <module>
    import rlcompleter
  File "C:\ProgramData\anaconda3\envs\python311\Lib\rlcompleter.py", line 210, in <module>
    import readline
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\readline.py", line 34, in <module>
    rl = Readline()
         ^^^^^^^^^^
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\pyreadline\rlmain.py", line 422, in __init__
    BaseReadline.__init__(self)
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\pyreadline\rlmain.py", line 62, in __init__
    mode.init_editing_mode(None)
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\pyreadline\modes\emacs.py", line 633, in init_editing_mode
    self._bind_key('space',       self.self_insert)
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\pyreadline\modes\basemode.py", line 162, in _bind_key
    if not callable(func):
           ^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\pyreadline\py3k_compat.py", line 8, in callable
    return isinstance(x, collections.Callable)
                         ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Callable'

I input command:

C:\Tools\Android_Tools\SDK-platform-tools>pip install Callable
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\exceptiongroup-1.2.1-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\importlib_metadata-7.1.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\mypy_extensions-1.0.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\tractor-0.1.0a6.dev0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\tricycle-0.4.1-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\trio-0.25.1-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\trio_typing-0.10.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\wrapt-1.16.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\python311\lib\site-packages\zipp-3.19.2-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting Callable
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ae/44/165695b2f13e42a6c7ee5338aa9b4029b2afbe87d57471342b6d570d4002/callable-0.1.2.tar.gz (3.2 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: attrs>=16.3 in c:\programdata\anaconda3\envs\python311\lib\site-packages (from Callable) (23.2.0)
Building wheels for collected packages: Callable
  Building wheel for Callable (setup.py) ... done
  Created wheel for Callable: filename=callable-0.1.2-py3-none-any.whl size=3163 sha256=871abcb636ff7a922b2c4c7d36d27e51ff74849a6bb7aaa4812b800cb76acdfa
  Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\db\15\0a\24d52edc956f5dac5d0750771f973a0dc2e34cb9e450349cf6
Successfully built Callable
Installing collected packages: Callable
Successfully installed Callable-0.1.2

It still report error...

@goodboy
Copy link
Owner

goodboy commented Jun 17, 2024

Hey @allrobot sorry about the delay answering but dev isn't happening really much from GH any more and we're planning to make this instance more of a "mirror" from a private git service (coming soon).


This issue has already been reported multiple timees and it's well known that the current alpha release on pypi doesn't work:

  • pdbpp borks our 0.1.0a5 on pypi 😂  #323
  • we don't really have anyone recently helping with windows support, so i don't really expect much to work in general since,
    • noone is helping maintain like we used to have in Windows support? #59
    • we aren't running windows in CI any more due to the flakyness of test run results.

upcoming changes that are prolly relvant:

  • we're moving to (actually it's already dev-ed in on our private service) poetry for pkging sys
  • pdbpp is kinda unmaintained/dead so we're now on pdbp a fork and fix.
  • there's a ton of new stuff coming in an a6 release that will have some pretty serious sweeping changes so it might be worth it to wait for that if you can ;)

@allrobot
Copy link
Author

If allowed, please update the PyPI package to fix the issue.

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

No branches or pull requests

2 participants