1

Trying to run python code to extract PST file. The code itself is here:

import pypff

pst = pypff.file()
pst.open("File.pst")
pst.close()

And here is attempt to install PST module libpff.

$ pip install libpff-python
Collecting libpff-python
  Using cached libpff-python-20211114.tar.gz (2.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: libpff-python
  Building wheel for libpff-python (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for libpff-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'pypff' extension
      error: Microsoft Visual C++ 14.0 or greater is require
      [end of output]

  note: This error originates from a subprocess, and is like
  ERROR: Failed building wheel for libpff-python
Failed to build libpff-python
ERROR: Could not build wheels for libpff-python, which is re
(venv)

Installation of "Microsoft Visual C++ 14.0 or greater" installation didn't help as well.

Also unsatisfied in this attempt:

$ pip install pst
Collecting pst
  Using cached pst-1.5.3.tar.gz (4.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: incremental in d:\dev\pst\venv\lib\site-packages (from pst) (22.10.0)
Building wheels for collected packages: pst
  Building wheel for pst (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pst (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [68 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib
      creating build\lib\pst
      copying pst\_version.py -> build\lib\pst
      installing to build\bdist.win-amd64\wheel
      running install
      running install_lib
      creating build\bdist.win-amd64
      creating build\bdist.win-amd64\wheel
      creating build\bdist.win-amd64\wheel\pst
      copying build\lib\pst\_version.py -> build\bdist.win-amd64\wheel\.\pst
      running install_data
      creating build\bdist.win-amd64\wheel\pst-1.5.3.data
      creating build\bdist.win-amd64\wheel\pst-1.5.3.data\data
      Traceback (most recent call last):
        File "D:\Dev\PST\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "D:\Dev\PST\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "D:\Dev\PST\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\build_meta.py", line 416, in build_wheel

          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\build_meta.py", line 401, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
          super(_BuildMetaLegacyBackend,
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 8, in <module>
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 378, in run
          self.run_command("install")
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\command\install.py", line 74, in run
          return orig.install.run(self)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\command\install.py", line 708, in run
          self.run_command(cmd_name)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\command\install_data.py", line 60, in run
          dir = convert_path(f[0])
        File "C:\Users\s\AppData\Local\Temp\pip-build-env-pr0jfe48\overlay\Lib\site-packages\setuptools\_distutils\util.py", line 139, in convert_path
          raise ValueError("path '%s' cannot be absolute" % pathname)
      ValueError: path '/usr/local/bin' cannot be absolute
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pst
Failed to build pst
ERROR: Could not build wheels for pst, which is required to install pyproject.toml-based projects
(venv)

In case of solution how to install PST library, please advise.

smart2004
  • 11
  • 3

0 Answers0