isu-kim / PyRGBDev

A Python Library for Controlling RGB Devices
MIT License
12 stars 2 forks source link

Error when trying to install this library #5

Open F1zzTao opened 2 years ago

F1zzTao commented 2 years ago

Describe the bug When I try to install PyRGBDev from PIP or a repository (git clone) I get an error.

To Reproduce Steps to reproduce the behavior:

  1. Open terminal (Windows Terminal in my case) as an administrator
  2. Type pip install pyrgbdev
  3. See error:

    
    PS C:\Users\timur> pip install pyrgbdev
    Collecting pyrgbdev
    Using cached pyrgbdev-1.0.5.tar.gz (311 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
    ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "C:\Users\timur\AppData\Roaming\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
          main()
        File "C:\Users\timur\AppData\Roaming\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\timur\AppData\Roaming\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\timur\AppData\Local\Temp\pip-build-env-o1h3g8iw\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "C:\Users\timur\AppData\Local\Temp\pip-build-env-o1h3g8iw\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "C:\Users\timur\AppData\Local\Temp\pip-build-env-o1h3g8iw\overlay\Lib\site-packages\setuptools\build_meta.py", line 482, in run_setup
          super(_BuildMetaLegacyBackend,
        File "C:\Users\timur\AppData\Local\Temp\pip-build-env-o1h3g8iw\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 17, in <module>
      ImportError: DLL load failed while importing shell: The specified procedure could not be found.
      [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.



**Expected behavior**
Successful installation of the library without any errors

**Versions**
Windows version: 25206.1000 (Windows 11 latest insider dev build)
Python version: 3.10.6
PIP version: 22.2.2
isu-kim commented 2 years ago

@timius100 I appologize for my late reply. I had so many things going on and was not able to check my open source projects.

According to the error message

     exec(code, locals())
        File "<string>", line 17, in <module>
      ImportError: DLL load failed while importing shell: The specified procedure could not be found.
      [end of output]

This seems like when installing pyrgbdev it was not able to find DLLs that were necessary.

So there are things that I would like to ask you:

  1. You have accidently pressed "no" for asking admin privileges during pip installation. Since the library needs those DLLs in your system32 directory, it will ask for your admin permission. Please check here if you think it is the case.
  2. Which brand vendor do you use? Corsair? Razer? or Both?

Again, I am really sorry for late reply. Feel free to ask me anything you need assist with.

Thanks

F1zzTao commented 2 years ago

I'm sure I clicked "yes" when it asked for admin privileges. I use razer.

isu-kim commented 2 years ago

Hmm, that is kind odd.

I got 2 more questions to ask:

I am guessing that my library was not able to find a .dll file. When installing the library, pyrgbdev will install Corsair ICUE SDK's DLL, however will not install Razer's RzChromaSDK64.dll into system32.

Honestly speaking, this was my first time having this issue. I reinstalled everything so that I can find a bug or error that you are experiencing in my environment. However was not able to reproduce one.

Always feel free to ask anything you need assist with. I will do my best to find solutions for your problem.

Thanks

F1zzTao commented 2 years ago

Sorry for my late replay. Yes, I have razer synapse, but I don't have RzChromaSDK64.dll in C:\Windows\System32 folder

isu-kim commented 2 years ago

@timius100 I am so sorry for late reply again. Recently, I was very busy with school work and could not check my personal opensource projects.

I am not sure if you have fixed it or not, but I guess it is the case with your Razer synapse missing RzChromaSDK64.dll. Since Using Razer features from pyrgbdeb requires RzChromaSDK64.dll in C:\Windows\System32, I guess that was the problem.

If you have any other problems, or this does not help you at all, please let me know. I will be answering faster than before since my busy time was kind of over.

Thanks and again, I really appolize for my late reply.