Postscript Preview in Visual Studio Code unter Win11

Begonnen von TomLee, 30 Oktober 2022, 13:18:05

Vorheriges Thema - Nächstes Thema

TomLee

Hallo,

kann mir irgendwer aufzeigen wie ich PostScript Preview zum laufen bekomme.

Weil ich mit Chocolatey nix anfangen kann hab ich Ghostscript ganz normal hier runtergeladen und installiert.
Bei den Umgebungsvariablen hab ich in Path C:\Program Files\gs\gs10.00.0\bin und C:\Program Files\poppler-22.04.0\Library\bin ergänzt, womit schonmal die erste Meldung weg ist (das Ghostscript nicht installiert ist) wenn man auf Preview in VSC klickt.

Bei der Suche wie ich ohne Chocolatey an pobbler komme bin ich hier fündig geworden, hier dann das letzte Release geladen, entpackt und das Verzeichnnis nach C:\Program Files\poppler-22.04.0 kopiert. Bei den Umgebungsvariablen hab ich in Path C:\Program Files\poppler-22.04.0\Library\bin ergänzt.

Vorsichtshalber Win neugestartet, wenn man auf Preview in VSC klickt kommt weiterhin die Meldung Failed to execute pdftocairo. Report bug with postscript file to dev.

Hier komm ich jetzt nicht weiter, wo ist denn dev genau  ::) ?

Thomas

betateilchen

das riecht nach Popcorn...

Zitat von: TomLee am 30 Oktober 2022, 13:18:05
Report bug with postscript file to dev.[/i]

Hier komm ich jetzt nicht weiter, wo ist denn dev genau

das ist jedenfalls nicht bei Dir auf dem Rechner.

englisch: "Report bug with postscript file to dev"
deutsch: "Fehler zusammen mit Postscript-Datei an die Entwickler melden"
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

TomLee

 ::)




Was mein Problem angeht, hätt ich jetzt gerne nen Mac.

TomLee

Versuchs heute Abend mal über python zu installieren, wie hier vor zwei Tagen vorgeschlagen.


TomLee

Ein Graus wenn ich es weiter mit Win versucht hätte (hatte angefangen), ich lass das einfach mal aus.




Sehr cool, hab mich verrückt machen lassen das Ubuntu nicht so einfach auf Win 11 (meinem neuen Notebook) zu installieren sei, das war jetzt nach kurz einlesen ganz einfach.

Nach der Installation waren es nur ein paar Klicks, VSC zu installieren, die Extensions zu installieren  (auch um auf meine .ps zuzugreifen, ftp-simple) und  die Vorschau klappt ohne weiteres zutun.

Bin ich froh das ich vorne angefangen habe und die Installation von Ubuntu nicht noch weiter hinausgeschoben habe.

betateilchen

A quaestio non est procul cum TomLee est circum.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

TomLee


TomLee

Du kannst hier, für Anwender die auf das gleiche Problem stossen wie ich, gerne festhalten wie man weiter vorgeht wo ich nicht weiter gekommen bin:


PS C:\Users\TomLee\AppData\Roaming\Code\User\globalStorage\humy2833.ftp-simple\remote-workspace-temp\3b9a22a461c04312f3758d778b6e4a91\opt\fhem> pip install python-poppler
Collecting python-poppler
  Downloading python-poppler-0.3.0.tar.gz (823 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 823.3/823.3 kB 4.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Installing collected packages: python-poppler
  DEPRECATION: python-poppler is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for python-poppler ... error
  error: subprocess-exited-with-error

  × Running setup.py install for python-poppler did not run successfully.
  │ exit code: 1
  ╰─> [92 lines of output]
      running install
      C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-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
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\destination.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\document.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\embeddedfile.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\font.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\image.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\page.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\pagerenderer.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\pagetransition.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\rectangle.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\toc.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\utilities.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\_version.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\__init__.py -> build\lib.win-amd64-cpython-311\poppler
      creating build\lib.win-amd64-cpython-311\poppler\cpp
      copying src\poppler\cpp\__init__.py -> build\lib.win-amd64-cpython-311\poppler\cpp
      running egg_info
      writing src\python_poppler.egg-info\PKG-INFO
      writing dependency_links to src\python_poppler.egg-info\dependency_links.txt
      writing top-level names to src\python_poppler.egg-info\top_level.txt
      reading manifest file 'src\python_poppler.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE.txt'
      writing manifest file 'src\python_poppler.egg-info\SOURCES.txt'
      running build_ext
      Traceback (most recent call last):
        File "C:\Users\TomLee\AppData\Local\Temp\pip-install-2lj2i6fa\python-poppler_e65947680a0e49be9a632f15b1ca2786\setup.py", line 24, in run
          out = subprocess.check_output(["cmake", "--version"])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 465, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 546, in run
          with Popen(*popenargs, **kwargs) as process:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1022, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1491, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

      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\TomLee\AppData\Local\Temp\pip-install-2lj2i6fa\python-poppler_e65947680a0e49be9a632f15b1ca2786\setup.py", line 76, in <module>
          setup(
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py", line 68, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
          self.run_command('build')
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
          self.run_command(cmd_name)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\Users\TomLee\AppData\Local\Temp\pip-install-2lj2i6fa\python-poppler_e65947680a0e49be9a632f15b1ca2786\setup.py", line 26, in run
          raise RuntimeError(
      RuntimeError: CMake must be installed to build the following extensions: poppler.cpp.modules     
      [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.
╰─> python-poppler

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


PS C:\Users\TomLee\AppData\Roaming\Code\User\globalStorage\humy2833.ftp-simple\remote-workspace-temp\3b9a22a461c04312f3758d778b6e4a91\opt\fhem> pip install cmake
Collecting cmake
  Downloading cmake-3.24.1.1-py2.py3-none-win_amd64.whl (39.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.7/39.7 MB 6.8 MB/s eta 0:00:00
Installing collected packages: cmake
Successfully installed cmake-3.24.1.1


PS C:\Users\TomLee\AppData\Roaming\Code\User\globalStorage\humy2833.ftp-simple\remote-workspace-temp\3b9a22a461c04312f3758d778b6e4a91\opt\fhem> pip install python-poppler
Collecting python-poppler
  Using cached python-poppler-0.3.0.tar.gz (823 kB)
  Preparing metadata (setup.py) ... done
Installing collected packages: python-poppler
  DEPRECATION: python-poppler is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for python-poppler ... error
  error: subprocess-exited-with-error

  × Running setup.py install for python-poppler did not run successfully.
  │ exit code: 1
  ╰─> [96 lines of output]
      running install
      C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-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
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\destination.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\document.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\embeddedfile.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\font.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\image.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\page.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\pagerenderer.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\pagetransition.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\rectangle.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\toc.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\utilities.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\_version.py -> build\lib.win-amd64-cpython-311\poppler
      copying src\poppler\__init__.py -> build\lib.win-amd64-cpython-311\poppler
      creating build\lib.win-amd64-cpython-311\poppler\cpp
      copying src\poppler\cpp\__init__.py -> build\lib.win-amd64-cpython-311\poppler\cpp
      running egg_info
      writing src\python_poppler.egg-info\PKG-INFO
      writing dependency_links to src\python_poppler.egg-info\dependency_links.txt
      writing top-level names to src\python_poppler.egg-info\top_level.txt
      reading manifest file 'src\python_poppler.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE.txt'
      writing manifest file 'src\python_poppler.egg-info\SOURCES.txt'
      running build_ext
      C:\Users\TomLee\AppData\Local\Temp\pip-install-9wela6qz\python-poppler_d15ae784b9cd44418d90279e1a3233ef\setup.py:32: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        cmake_version = LooseVersion(
      -- Building for: NMake Makefiles
      CMake Error at CMakeLists.txt:2 (project):
        Generator

          NMake Makefiles

        does not support platform specification, but platform

          x64

        was specified.


      CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
      CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
      -- Configuring incomplete, errors occurred!
      See also "C:/Users/TomLee/AppData/Local/Temp/pip-install-9wela6qz/python-poppler_d15ae784b9cd44418d90279e1a3233ef/build/temp.win-amd64-cpython-311/Release/CMakeFiles/CMakeOutput.log".
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\TomLee\AppData\Local\Temp\pip-install-9wela6qz\python-poppler_d15ae784b9cd44418d90279e1a3233ef\setup.py", line 76, in <module>
          setup(
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py", line 68, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
          self.run_command('build')
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
          self.run_command(cmd_name)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
          super().run_command(command)
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\Users\TomLee\AppData\Local\Temp\pip-install-9wela6qz\python-poppler_d15ae784b9cd44418d90279e1a3233ef\setup.py", line 39, in run
          self.build_extension(ext)
        File "C:\Users\TomLee\AppData\Local\Temp\pip-install-9wela6qz\python-poppler_d15ae784b9cd44418d90279e1a3233ef\setup.py", line 68, in build_extension
          subprocess.check_call(
        File "C:\Users\TomLee\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\TomLee\\AppData\\Local\\Temp\\pip-install-9wela6qz\\python-poppler_d15ae784b9cd44418d90279e1a3233ef', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\TomLee\\AppData\\Local\\Temp\\pip-install-9wela6qz\\python-poppler_d15ae784b9cd44418d90279e1a3233ef\\build\\lib.win-amd64-cpython-311\\poppler\\cpp', '-DPYTHON_EXECUTABLE=C:\\Users\\TomLee\\AppData\\Local\\Programs\\Python\\Python311\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\TomLee\\AppData\\Local\\Temp\\pip-install-9wela6qz\\python-poppler_d15ae784b9cd44418d90279e1a3233ef\\build\\lib.win-amd64-cpython-311\\poppler\\cpp', '-A', 'x64']' returned non-zero exit status 1.
      [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.
╰─> python-poppler

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