How can I install python3-clang on Linux Mint 18.04?

1

I have a vim plugin called CLighter8 that requires the package python3-clang, but unfortnuately I can't find it in the default repository nor any other repository. So I can't really find a way to install it.
Is there a way to install it manually directly from the source? Without haveing to reinstall all the other python packages I installed through pip3?

user2741831

Posted 2018-12-19T12:14:29.883

Reputation: 135

Answers

0

Linux Mint 18.04 doesn't exist. Did you mean a version of Linux Mint which is based on Ubuntu 18.04?

I think what you want to install is this. If so, you have to install clang first. You should get clang from the official clang repos found here. You can run these commands to install clang 6.0 on Ubuntu 18.04 (or Linux Mint 19):

$ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
$ sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-6.0 main" #replace this with "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" for clang 7.0
$ sudo apt-get update
$ sudo apt-get install clang-6.0

For more info see the above link to the LLVM project page.

Once you have installed clang, you can install the clang python package - pip3 install clang.

Also it looks like you should install libclang-dev after more carefully reading the project README.

Hope this helped!

an actual toaster

Posted 2018-12-19T12:14:29.883

Reputation: 26