Dadoum / pyprovision

Python bindings to [Provision](https://github.com/Dadoum/Provision)
Other
13 stars 1 forks source link

Unable to complete install #5

Open goliath29 opened 9 months ago

goliath29 commented 9 months ago

I have installed dependencies and am unable to complete the install when using "sudo python3 -m pip install ."

Below is the output of the error message.

$ sudo python3 -m pip install .

Processing /home/XXX/pyprovision
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyprovision
  Building wheel for pyprovision (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      running bdist_wheel
      running build
      running build_py
      package init file 'pyprovision/__init__.py' not found (or not a regular file)
      running build_ext
      Usage:
      ['.gitignore', 'LICENSE', 'README.md', '.git', 'pyprovision', 'example.py', 'build', 'setup.py']
      dub build -c python310 -b release
      error: command 'dub' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyprovision
  Running setup.py clean for pyprovision
Failed to build pyprovision
Installing collected packages: pyprovision
  Running setup.py install for pyprovision ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyprovision did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      package init file 'pyprovision/__init__.py' not found (or not a regular file)
      running build_ext
      Usage:
      ['.gitignore', 'LICENSE', 'README.md', '.git', 'pyprovision', 'example.py', 'setup.py']
      dub build -c python310 -b release
      error: command 'dub' failed: No such file or directory
      [end of output]

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

× Encountered error while trying to install package.
╰─> pyprovision

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I'm positive it is something small I'm missing, but have been unable to locate an answers this far.

Thank you for the help!

Dadoum commented 9 months ago

Install DUB from your package manager. If it's not there, search on how to set-up a D programming environment.

The procedure is described there in the README.

goliath29 commented 9 months ago

Thanks for the quick response!!

I installed DUB and attempted to run the process again, and it is now displaying the below error instead.

$ pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /home/XXX/pyprovision
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyprovision
  Building wheel for pyprovision (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      running bdist_wheel
      running build
      running build_py
      package init file 'pyprovision/__init__.py' not found (or not a regular file)
      running build_ext
      Usage:
      ['.gitignore', 'LICENSE', 'README.md', '.git', 'pyprovision', 'example.py', 'build', 'setup.py', '__init__.py']
      dub build -c python310 -b release
      Fetching dxml 0.4.4 (getting selected version)...
      Fetching automem 0.6.9 (getting selected version)...
      Fetching pyd 0.14.4 (getting selected version)...
      Fetching requests 2.1.2 (getting selected version)...
      Fetching slf4d 2.4.3 (getting selected version)...
      Fetching plist ~master (getting selected version)...
      Fetching test_allocator 0.3.4 (getting selected version)...
      Fetching cachetools 0.4.1 (getting selected version)...
      Fetching unit-threaded 0.10.8 (getting selected version)...
      Performing "release" build using /usr/bin/ldc2 for x86_64.
      dxml 0.4.4: building configuration "library"...
      plist ~master: building configuration "library"...
      automem 0.6.9: building configuration "library"...
      cachetools 0.4.1: building configuration "library"...
      requests 2.1.2: building configuration "std"...
      slf4d 2.4.3: building configuration "library"...
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(34,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.this` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(89,5):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(43,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(63,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(96,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.reader` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(136,22):        Consider adding `shared` here
      /usr/bin/ldc2 failed with exit code 1.
      error: command '/usr/bin/dub' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyprovision
  Running setup.py clean for pyprovision
Failed to build pyprovision
Installing collected packages: pyprovision
  Running setup.py install for pyprovision ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyprovision did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      package init file 'pyprovision/__init__.py' not found (or not a regular file)
      running build_ext
      Usage:
      ['.gitignore', 'LICENSE', 'README.md', '.git', 'pyprovision', 'example.py', 'build', 'setup.py', '__init__.py']
      dub build -c python310 -b release
      Performing "release" build using /usr/bin/ldc2 for x86_64.
      dxml 0.4.4: target for configuration "library" is up to date.
      plist ~master: target for configuration "library" is up to date.
      automem 0.6.9: target for configuration "library" is up to date.
      cachetools 0.4.1: target for configuration "library" is up to date.
      requests 2.1.2: target for configuration "std" is up to date.
      slf4d 2.4.3: building configuration "library"...
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(34,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.this` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(89,5):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(43,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(63,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(96,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.reader` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(136,22):        Consider adding `shared` here
      /usr/bin/ldc2 failed with exit code 1.
      error: command '/usr/bin/dub' failed with exit code 2
      [end of output]

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

× Encountered error while trying to install package.
╰─> pyprovision

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Again, sure it's something I'm missing but I am unable to locate the issue.

Dadoum commented 9 months ago

I think it's because the compiler is outdated. Can you run ldc2 --version?

goliath29 commented 9 months ago
LDC - the LLVM D compiler (1.20.1):
  based on DMD v2.090.1 and LLVM 10.0.0
  built with LDC - the LLVM D compiler (1.20.1)
  Default target: x86_64-pc-linux-gnu
  Host CPU: znver1
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    avr        - Atmel AVR Microcontroller
    bpf        - BPF (host endian)
    bpfeb      - BPF (big endian)
    bpfel      - BPF (little endian)
    hexagon    - Hexagon
    lanai      - Lanai
    mips       - MIPS (32-bit big endian)
    mips64     - MIPS (64-bit big endian)
    mips64el   - MIPS (64-bit little endian)
    mipsel     - MIPS (32-bit little endian)
    msp430     - MSP430 [experimental]
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    riscv32    - 32-bit RISC-V
    riscv64    - 64-bit RISC-V
    sparc      - Sparc
    sparcel    - Sparc LE
    sparcv9    - Sparc V9
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    wasm32     - WebAssembly 32-bit
    wasm64     - WebAssembly 64-bit
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
    xcore      - XCore
Dadoum commented 9 months ago

Oh, your compiler is now 4 years old. Try to use the bash command in the readme to install an up-to-date version, and then activate it in your shell (it will give you a small command at the end of the installation procedure) and then, in the same terminal, try to build pyprovision (you can also activate the environment with the command it gave you in any other terminal).

goliath29 commented 9 months ago

I have updated versions of the compiler, and appears to be the correct version now which I have included below.

LDC - the LLVM D compiler (1.36.0):
  based on DMD v2.106.1 and LLVM 17.0.6
  built with LDC - the LLVM D compiler (1.36.0)
  Default target: x86_64-unknown-linux-gnu
  Host CPU: znver1
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    aarch64     - AArch64 (little endian)
    aarch64_32  - AArch64 (little endian ILP32)
    aarch64_be  - AArch64 (big endian)
    amdgcn      - AMD GCN GPUs
    arm         - ARM
    arm64       - ARM64 (little endian)
    arm64_32    - ARM64 (little endian ILP32)
    armeb       - ARM (big endian)
    avr         - Atmel AVR Microcontroller
    bpf         - BPF (host endian)
    bpfeb       - BPF (big endian)
    bpfel       - BPF (little endian)
    hexagon     - Hexagon
    lanai       - Lanai
    loongarch32 - 32-bit LoongArch
    loongarch64 - 64-bit LoongArch
    mips        - MIPS (32-bit big endian)
    mips64      - MIPS (64-bit big endian)
    mips64el    - MIPS (64-bit little endian)
    mipsel      - MIPS (32-bit little endian)
    msp430      - MSP430 [experimental]
    nvptx       - NVIDIA PTX 32-bit
    nvptx64     - NVIDIA PTX 64-bit
    ppc32       - PowerPC 32
    ppc32le     - PowerPC 32 LE
    ppc64       - PowerPC 64
    ppc64le     - PowerPC 64 LE
    r600        - AMD GPUs HD2XXX-HD6XXX
    riscv32     - 32-bit RISC-V
    riscv64     - 64-bit RISC-V
    sparc       - Sparc
    sparcel     - Sparc LE
    sparcv9     - Sparc V9
    spirv32     - SPIR-V 32-bit
    spirv64     - SPIR-V 64-bit
    systemz     - SystemZ
    thumb       - Thumb
    thumbeb     - Thumb (big endian)
    ve          - VE
    wasm32      - WebAssembly 32-bit
    wasm64      - WebAssembly 64-bit
    x86         - 32-bit X86: Pentium-Pro and above
    x86-64      - 64-bit X86: EM64T and AMD64
    xcore       - XCore

I am now facing the below error, I have attempted updating the compiler again with no success, and am unsure of the best way to proceed further, as I do not wish to break anything further.

[sudo] password for XXXX:
Processing /home/XXXX/pyprovision
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyprovision
  Building wheel for pyprovision (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      Usage:
      ['pyprovision', '.git', 'build', 'example.py', 'setup.py', 'LICENSE', '.gitignore', 'README.md']
      dub build -c python310 -b release
      Performing "release" build using /usr/bin/ldc2 for x86_64.
      dxml 0.4.4: target for configuration "library" is up to date.
      plist ~master: target for configuration "library" is up to date.
      automem 0.6.9: target for configuration "library" is up to date.
      cachetools 0.4.1: target for configuration "library" is up to date.
      requests 2.1.2: target for configuration "std" is up to date.
      slf4d 2.4.3: building configuration "library"...
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(34,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.this` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(89,5):        Consider adding `shared` here
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(43,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(63,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(96,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.reader` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(136,22):        Consider adding `shared` here
      /usr/bin/ldc2 failed with exit code 1.
      error: command '/usr/bin/dub' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyprovision
  Running setup.py clean for pyprovision
Failed to build pyprovision
Installing collected packages: pyprovision
  Running setup.py install for pyprovision ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyprovision did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      running install
      /usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!

              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.

              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************

      !!
        self.initialize_options()
      running build
      running build_py
      running build_ext
      Usage:
      ['pyprovision', '.git', 'example.py', 'setup.py', 'LICENSE', '.gitignore', 'README.md']
      dub build -c python310 -b release
      Performing "release" build using /usr/bin/ldc2 for x86_64.
      dxml 0.4.4: target for configuration "library" is up to date.
      plist ~master: target for configuration "library" is up to date.
      automem 0.6.9: target for configuration "library" is up to date.
      cachetools 0.4.1: target for configuration "library" is up to date.
      requests 2.1.2: target for configuration "std" is up to date.
      slf4d 2.4.3: building configuration "library"...
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(34,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.this` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(89,5):        Consider adding `shared` here
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(43,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(63,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      /root/.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(96,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.reader` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(136,22):        Consider adding `shared` here
      /usr/bin/ldc2 failed with exit code 1.
      error: command '/usr/bin/dub' failed with exit code 2
      [end of output]

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

× Encountered error while trying to install package.
╰─> pyprovision

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Dadoum commented 9 months ago

Try to build it in your terminal as a user (not root)

goliath29 commented 9 months ago

Still facing the below error. I think the slf4d package is not communicating with the setup script for pyprovision currently. I have integrated slf4d into dub per the repo's instructions but they do not seem to communicate. I have also raised an issue on slf4d to seek assistance with that package also due to thinking it may be a problem there.

Defaulting to user installation because normal site-packages is not writeable
Processing /home/XXXX/pyprovision
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyprovision
  Building wheel for pyprovision (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      Usage:
      ['pyprovision', '.git', 'build', 'example.py', 'VALUE', 'setup.py', 'LICENSE', '.gitignore', 'README.md']
      dub build -c python310 -b release
      Performing "release" build using /usr/bin/ldc2 for x86_64.
      dxml 0.4.4: target for configuration "library" is up to date.
      plist ~master: target for configuration "library" is up to date.
      automem 0.6.9: target for configuration "library" is up to date.
      cachetools 0.4.1: target for configuration "library" is up to date.
      requests 2.1.2: target for configuration "std" is up to date.
      slf4d 2.4.3: building configuration "library"...
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(34,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.this` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(89,5):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(43,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(63,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(96,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.reader` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(136,22):        Consider adding `shared` here
      /usr/bin/ldc2 failed with exit code 1.
      error: command '/usr/bin/dub' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyprovision
  Running setup.py clean for pyprovision
Failed to build pyprovision
Installing collected packages: pyprovision
  Running setup.py install for pyprovision ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyprovision did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      running install
      /usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!

              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.

              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************

      !!
        self.initialize_options()
      running build
      running build_py
      running build_ext
      Usage:
      ['pyprovision', '.git', 'build', 'example.py', 'VALUE', 'setup.py', 'LICENSE', '.gitignore', 'README.md']
      dub build -c python310 -b release
      Performing "release" build using /usr/bin/ldc2 for x86_64.
      dxml 0.4.4: target for configuration "library" is up to date.
      plist ~master: target for configuration "library" is up to date.
      automem 0.6.9: target for configuration "library" is up to date.
      cachetools 0.4.1: target for configuration "library" is up to date.
      requests 2.1.2: target for configuration "std" is up to date.
      slf4d 2.4.3: building configuration "library"...
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(34,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.this` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(89,5):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(43,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(63,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.writer` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(148,22):        Consider adding `shared` here
      ../../.dub/packages/slf4d-2.4.3/slf4d/source/slf4d/default_provider/factory.d(96,22): Error: non-shared method `core.sync.rwmutex.ReadWriteMutex.reader` is not callable using a `shared` object
      /usr/lib/ldc/x86_64-linux-gnu/include/d/core/sync/rwmutex.d(136,22):        Consider adding `shared` here
      /usr/bin/ldc2 failed with exit code 1.
      error: command '/usr/bin/dub' failed with exit code 2
      [end of output]

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

× Encountered error while trying to install package.
╰─> pyprovision

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Dadoum commented 9 months ago

I am pretty sure it's because /usr/bin/ldc2 is your system ldc2 binary which is too old, while the up-to-date LDC compiler is elsewhere.

goliath29 commented 9 months ago

I have update ldc2 on my computer, along with in the Ubuntu terminal I am using and still face the same error. Below is my current output of ldc2 --version which I believe is the most recent from what I can tell online.

LDC - the LLVM D compiler (1.28.0):
  based on DMD v2.098.0 and LLVM 11.1.0
  built with LDC - the LLVM D compiler (1.28.0)
  Default target: x86_64-pc-linux-gnu
  Host CPU: znver1
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    avr        - Atmel AVR Microcontroller
    bpf        - BPF (host endian)
    bpfeb      - BPF (big endian)
    bpfel      - BPF (little endian)
    hexagon    - Hexagon
    lanai      - Lanai
    mips       - MIPS (32-bit big endian)
    mips64     - MIPS (64-bit big endian)
    mips64el   - MIPS (64-bit little endian)
    mipsel     - MIPS (32-bit little endian)
    msp430     - MSP430 [experimental]
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    riscv32    - 32-bit RISC-V
    riscv64    - 64-bit RISC-V
    sparc      - Sparc
    sparcel    - Sparc LE
    sparcv9    - Sparc V9
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    wasm32     - WebAssembly 32-bit
    wasm64     - WebAssembly 64-bit
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
    xcore      - XCore
Dadoum commented 9 months ago

1.28 is more than 2 years old, and I only tested my code with 1.33 (and sometimes with 1.32) unfortunately. The latest version is 1.36.

fuad00 commented 8 months ago

any solution here?

Dadoum commented 8 months ago

any solution here?

Update dub and LDC2

fuad00 commented 8 months ago

any solution here?

Update dub and LDC2

already updated: CleanShot 2024-02-10 at 17 33 14@2x

the issue looks like this: CleanShot 2024-02-10 at 17 31 57@2x

Dadoum commented 8 months ago

Oh that's not the same error, here you just have to install development headers for python3.11

fuad00 commented 8 months ago

Oh that's not the same error, here you just have to install development headers for python3.11

thanks for a quick response! unfortunately i can't find any info about installing dev version of python3 on my mac :(

Dadoum commented 8 months ago

maybe with brew? brew install python@3.11

fuad00 commented 8 months ago

brew install python@3.11

already installed and up-to-date.