wavefrontshaping / slmPy

A simple Python module based on wxPython to interact with spatial light modulators handled as secondary monitors.
Other
63 stars 26 forks source link

on wsl error installing (pkg-config probably not installed) #13

Closed giammi56 closed 1 year ago

giammi56 commented 1 year ago

WSL Ubuntu 22.04 returns the following error when pip install slmpy

E:\me\interferece_software\time-multiplexed-neural-holography>pip install slmpy
Collecting slmpy
  Using cached slmpy-0.3.3.tar.gz (12 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "E:\anaconda3\envs\tmnh\lib\site-packages\pkgconfig\pkgconfig.py", line 91, in _wrapper
          return func(*args, **kwargs)
        File "E:\anaconda3\envs\tmnh\lib\site-packages\pkgconfig\pkgconfig.py", line 125, in exists
          return call(cmd) == 0
        File "E:\anaconda3\envs\tmnh\lib\subprocess.py", line 345, in call
          with Popen(*popenargs, **kwargs) as p:
        File "E:\anaconda3\envs\tmnh\lib\subprocess.py", line 971, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "E:\anaconda3\envs\tmnh\lib\subprocess.py", line 1456, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
      FileNotFoundError: [WinError 2] The system cannot find the file specified

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\me\AppData\Local\Temp\pip-install-wu1hwdq2\slmpy_11ec9589b7e242888e78bf3a4c5b4351\setup.py", line 182, in <module>
          pkgconfig.parse("eigen3")["include_dirs"],
        File "E:\anaconda3\envs\tmnh\lib\site-packages\pkgconfig\pkgconfig.py", line 248, in parse
          _raise_if_not_exists(package)
        File "E:\anaconda3\envs\tmnh\lib\site-packages\pkgconfig\pkgconfig.py", line 102, in _raise_if_not_exists
          if not exists(package):
        File "E:\anaconda3\envs\tmnh\lib\site-packages\pkgconfig\pkgconfig.py", line 93, in _wrapper
          raise EnvironmentError("pkg-config probably not installed: %r" % e)
      OSError: pkg-config probably not installed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

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

Any ideas?

wavefrontshaping commented 1 year ago

Hi,

Seems not to be a problem related to pyMMF. It says it lacks the package pkg-config, have you try to install it?

sudo apt-get install pkg-config
giammi56 commented 1 year ago

My fault, I was running my program in cmd and not wsl!