dydx-v3-python icon indicating copy to clipboard operation
dydx-v3-python copied to clipboard

Error when install.

Open magic-thomas opened this issue 1 year ago • 1 comments

Hi .

Installation is impossible . see my error.

Fresh installation is not useful too.

env) ➜  a1 pip install dydx-v3-python
Collecting dydx-v3-python
  Using cached dydx_v3_python-2.1.0-py3-none-any.whl.metadata (5.4 kB)
Requirement already satisfied: aiohttp>=3.8.1 in ./env/lib/python3.12/site-packages (from dydx-v3-python) (3.10.5)
Collecting cytoolz==0.12.1 (from dydx-v3-python)
  Using cached cytoolz-0.12.1.tar.gz (503 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [86 lines of output]
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          cdef readonly object func
          cdef readonly tuple args
          cdef readonly dict keywords
          cdef public object __doc__
          cdef public object __name__
          cdef public object __module__
                             ^
      ------------------------------------------------------------
      
      cytoolz/functoolz.pxd:18:23: '__module__' redeclared
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          cdef readonly object func
          cdef readonly tuple args
          cdef readonly dict keywords
          cdef public object __doc__
          cdef public object __name__
          cdef public object __module__
               ^
      ------------------------------------------------------------
      
      cytoolz/functoolz.pxd:18:9: Compiler crash in AnalyseDeclarationsTransform
      
      File 'ModuleNode.py', line 203, in analyse_declarations: ModuleNode(functoolz.pxd:1:0,
          full_module_name = 'cytoolz.functoolz',
          is_pxd = True)
      File 'Nodes.py', line 393, in analyse_declarations: StatListNode(functoolz.pxd:1:0)
      File 'Nodes.py', line 5509, in analyse_declarations: CClassDefNode(functoolz.pxd:10:5,
          as_name = 'curry',
          class_name = 'curry',
          in_pxd = True,
          module_name = '',
          punycode_class_name = 'curry',
          visibility = 'private')
      File 'Nodes.py', line 393, in analyse_declarations: StatListNode(functoolz.pxd:11:4)
      File 'Nodes.py', line 1546, in analyse_declarations: CVarDefNode(functoolz.pxd:18:9,
          in_pxd = True,
          modifiers = [...]/0,
          visibility = 'public')
      
      Compiler crash traceback from this point on:
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/Cython/Compiler/Nodes.py", line 1546, in analyse_declarations
          self.entry = dest_scope.declare_var(
                       ^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/Cython/Compiler/Symtab.py", line 2413, in declare_var
          entry = self.declare(name, cname, type, pos, visibility)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/Cython/Compiler/Symtab.py", line 551, in declare
          entries[name].already_declared_here()
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/Cython/Compiler/Symtab.py", line 263, in already_declared_here
          error(self.pos, "Previous declaration is here")
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/Cython/Compiler/Errors.py", line 178, in error
          raise InternalError(message)
      InternalError: Internal compiler error: Previous declaration is here
      [1/5] Cythonizing cytoolz/dicttoolz.pyx
      [2/5] Cythonizing cytoolz/functoolz.pyx
      Traceback (most recent call last):
        File "/Users/tom/workspace/crypto-project/a1/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/tom/workspace/crypto-project/a1/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/tom/workspace/crypto-project/a1/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 503, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 85, in <module>
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
          cythonize_one(*args)
        File "/private/var/folders/k8/z3z2_vvx20ndbsz9tqw3xbzw0000gn/T/pip-build-env-t7bcw6xr/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: cytoolz/functoolz.pyx
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(env) ➜  a1 

magic-thomas avatar Sep 10 '24 12:09 magic-thomas

Update the dependency to cytoolz==0.12.3 .

you can also use my fork, which is more lax about depency versions: https://github.com/fl4p/dydx-v3-python

fl4p avatar Sep 11 '24 14:09 fl4p