Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Python header files #565

Closed
Golddouble opened this issue Aug 6, 2020 · 8 comments
Closed

Missing Python header files #565

Golddouble opened this issue Aug 6, 2020 · 8 comments
Labels
os:linux Affects only Linux status:stale This item will be closed soon due to inactivity type:support A question about using vorta

Comments

@Golddouble
Copy link

I have tried to install Vorta with this description:
https://vorta.borgbase.com/download/linux/

Install from Source

The most generic way is to install it as Python package using PIP. First install Borg using the package of your distribution or via PyPI. The latter needs some additional source packages. Then install Vorta from PyPI. Your local Python version must be >= 3.6.

$ pip3 install vorta

Python is installed also pip3 is installed. The process worked great until here:

[...]

rce/12.7
      running build_ext
      building 'sipbuild.code_generator' extension
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/code_generator
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.7m -c code_generator/export.c -o build/temp.linux-x86_64-3.7/code_generator/export.o
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.7m -c code_generator/extracts.c -o build/temp.linux-x86_64-3.7/code_generator/extracts.o
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.7m -c code_generator/gencode.c -o build/temp.linux-x86_64-3.7/code_generator/gencode.o
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.7m -c code_generator/heap.c -o build/temp.linux-x86_64-3.7/code_generator/heap.o
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.7m -c code_generator/lexer.c -o build/temp.linux-x86_64-3.7/code_generator/lexer.o
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.7m -c code_generator/parser.c -o build/temp.linux-x86_64-3.7/code_generator/parser.o
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.7m -c code_generator/pybinding.c -o build/temp.linux-x86_64-3.7/code_generator/pybinding.o
      code_generator/pybinding.c:26:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
       #include <Python.h>
                ^~~~~~~~~~
      compilation terminated.
      error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
      ----------------------------------------
  Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-hhp_4xe9/sip/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ookmvo3h/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-5v2y54bu --compile" failed with error code 1 in /tmp/pip-install-hhp_4xe9/sip/
  
  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-5v2y54bu --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- "sip >=5.3, <7" "PyQt-builder >=1.1.0, <2"" failed with error code 1 in None

Something seems to be wrong. But what? And what can I do?
Thank you.

@m3nu
Copy link
Contributor

m3nu commented Aug 6, 2020

You're missing Python headers required to compile Qt & friends. You're distro will generally have them.

@m3nu m3nu added os:linux Affects only Linux type:support A question about using vorta labels Aug 6, 2020
@m3nu m3nu changed the title Vorta installation not successful Missing Python header files Aug 6, 2020
@Golddouble
Copy link
Author

Thank you.

Python3 is installed by default in my distro, but it seems, not all packages. (?)

So what package do I have to install exactly in addition? Is it in this list?:
Vorta installation

Thank you.

@ThomasWaldmann
Copy link
Collaborator

python3.x-dev is the usual name on debian-like lists.

@Golddouble
Copy link
Author

Thank you.

Yes, I have a debian based distribution.
I have found the package "python3-dev" in Synaptic. It was not in the PI of my distribution.

I am a step further now. But there seems still to be something wrong:

$ pip3 install vorta
Collecting vorta
  Using cached https://files.pythonhosted.org/packages/e6/f4/071cbc44f4d7268b138f6b21c382d2dadbedec7a028c06940c76c25057ab/vorta-0.6.26.tar.gz
Collecting appdirs (from vorta)
  Using cached https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl
Collecting apscheduler (from vorta)
  Using cached https://files.pythonhosted.org/packages/f3/34/9ef20ed473c4fd2c3df54ef77a27ae3fc7500b16b192add4720cab8b2c09/APScheduler-3.6.3-py2.py3-none-any.whl
Collecting paramiko (from vorta)
  Using cached https://files.pythonhosted.org/packages/06/1e/1e08baaaf6c3d3df1459fd85f0e7d2d6aa916f33958f151ee1ecc9800971/paramiko-2.7.1-py2.py3-none-any.whl
Collecting peewee (from vorta)
  Using cached https://files.pythonhosted.org/packages/e1/3e/a21e7268fa39756cdbd6d86af78ff1c0a92b84d6dbfadff431e9e3b9e1d3/peewee-3.13.3.tar.gz
Collecting psutil (from vorta)
  Using cached https://files.pythonhosted.org/packages/aa/3e/d18f2c04cf2b528e18515999b0c8e698c136db78f62df34eee89cee205f1/psutil-5.7.2.tar.gz
Collecting pyqt5 (from vorta)
  Using cached https://files.pythonhosted.org/packages/8c/90/82c62bbbadcca98e8c6fa84f1a638de1ed1c89e85368241e9cc43fcbc320/PyQt5-5.15.0.tar.gz
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-lsc4eoau/pyqt5/setup.py'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-lsc4eoau/pyqt5/

@ktosiek
Copy link
Contributor

ktosiek commented Aug 14, 2020

First, I would recommend against using the "Install from Source" instructions - you shouldn't have to install all the python libs globally. I've just opened #584 to see how the documentation can be changed.

If you want to install from source, something like pipx install vorta should be more appropriate (you'll probably need to apt install pipx first). This way Vorta gets a nice, isolated environment without polluting the global Python installation.

Now, the problem you are seeing is probably due to using an old version of pip. This is expected with the system python - system python packages are managed with apt and the system's pip is only really used to bootstrap virtualenvs.

@Golddouble
Copy link
Author

Golddouble commented Aug 14, 2020

Thank you.

The reason why I tried out the "install from Source" method is only because I was hoping to solve this issue:
#554

Question:
With your installation method in ubuntu you suggest:
Are you able now, to run this command as "post-back-command"? :
speaker-test -t wave -W /home/user/.SoundsEreignis -w pluck.wav -r 11025 -l 1

?

Or this:
<paplay /path/to/file>

@ktosiek
Copy link
Contributor

ktosiek commented Aug 15, 2020

I don't really understand how to use speaker-test with a custom file, but paplay worked without problems as a pre/post-backup command. pipx runs Vorta unconstrained, not in a sandbox - it's a bit like a python-only, per-user /opt :-)

@stale
Copy link

stale bot commented Oct 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status:stale This item will be closed soon due to inactivity label Oct 14, 2020
@stale stale bot closed this as completed Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:linux Affects only Linux status:stale This item will be closed soon due to inactivity type:support A question about using vorta
Projects
None yet
Development

No branches or pull requests

4 participants