p4vasp
p4vasp copied to clipboard
Installation issue with Ubuntu 20.04LTS
Hi,
I am trying to install p4vasp in my computer but I cannot install it. I have python3 installed and i am using ubuntu 20.04Lts. Can anyone tell me the error that I am making?
Thank you.
Indrajit
i am also having this issue.
- p4vasp uses
python2
. If you havepython2
installed then you should be good to go. - the quick installation script is broken so you'll need to follow the step by step installation instruction.
- you will probably need to use this as well.
Same issue here as well. I have python2 installed. Step by step installation gives the same error at "sudo make install". I applied the instructions on the link written in the 3rd option given by Chengcheng-Xiao. But the problem continues. However I found a package called "vasprun-xml" which pretty much covers what I want from p4vasp.
It's unclear to me whether python-glade2 is still distributed, especially for newer Ubuntu distros
You'll need to stick with 18.04 LTS and there you can simply run sudo apt install p4vasp
.
Hi all,
I update an installation guide and it's tested on Ubuntu 20.04 LTS and 22.04 LTS. However, the pull request has not been reviewed by the owner so you have to find the guide from my fork here.
Good luck and any feedback is welcome.
Cheers, Haoyu
@DanielYang59 thank you for your guide. I managed to install p4v on Ubuntu 22.04 using a variation of your guide:
# To install p4vasp locally:
# Install dependencies
sudo apt install build-essential git python2 python2-dev python2-pip-whl g++ libx11-dev mesa-common-dev libglu1-mesa-dev doxygen libcanberra-gtk-module libcanberra-gtk3-module libffi7 libgdk-pixbuf2.0-0 python-setuptools libglade2-0 pkg-config libfreetype6 libfreetype6-dev libfreetype-dev freetype2-doc binutils -y
# Download and install dependencies not working on Ubuntu 22.04:
wget http://mirrors.kernel.org/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/p/pygobject-2/python-gobject-2_2.28.6-14ubuntu1_amd64.deb
sudo dpkg -i python-cairo_1.16.2-2ubuntu2_amd64.deb
sudo dpkg -i python-gobject-2_2.28.6-14ubuntu1_amd64.deb
# Clone the p4vasp repo
git clone https://github.com/orest-d/p4vasp
export curr_location=$(pwd)
cd /tmp/
# Extract the deb packages and rename python to python2 in the dependencies
# the dependencies are listed in the control file, which must be extracted
# from the control.tar.xz compressed file
# python-gtk2
echo "Installing python-gtk2"
mkdir ./python-gtk2_tmp-install
cd ./python-gtk2_tmp-install
echo $(pwd)
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
ar x python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
tar xvf control.tar.xz
# edit control
sed -i 's|python (|python2 (|g' control
sed -i 's|python:|python2:|g' control
# Repackage the deb file and install
tar --ignore-failed-read -cvzf control.tar.gz {post,pre}{inst,rm} md5sums control
ar rcs gtk_repackaged.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i ./gtk_repackaged.deb
# python-glade2
echo "Installing python-glade2"
cd /tmp
mkdir ./python-glade2_tmp-install
cd ./python-glade2_tmp-install
echo $(pwd)
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-glade2_2.24.0-5.1ubuntu2_amd64.deb
ar x python-glade2_2.24.0-5.1ubuntu2_amd64.deb
tar xvf control.tar.xz
# edit control
sed -i 's|python (|python2 (|g' control
# Repackage the deb file and install
tar --ignore-failed-read -cvzf control.tar.gz {post,pre}{inst,rm} md5sums control
ar rcs glade_repackaged.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i ./glade_repackaged.deb
cd /tmp/
rm -rf python-glade2_tmp-install python-gtk2_tmp-install
cd $curr_location
# Copy the downloaded version to the p4vasp folder and compile fltk
wget https://www.fltk.org/pub/fltk/1.3.8/fltk-1.3.8-source.tar.gz
cp fltk-1.3.8-source.tar.gz p4vasp/ext
cd p4vasp/ext
tar -zxvf fltk-1.3.8-source.tar.gz
sudo chmod u+x build-fltk.sh
sed -i 's|1.3.0|1.3.8|g' build-fltk.sh
./build-fltk.sh
cd ..
# Compile p4v
make local
make install && make bashrc
After running this, source .bashrc
or open a new shell and the p4v command should work.
Hi @pol-sb, thanks for bringing the new idea and I could confirm it worked in my test on Ubuntu 22.04 WSL. However there might have been a typo in the file name:
# python-glade2
ar x python-glade2_2.24.0-5.1ubuntu2_amd64.deb
tar xvf control.tar.gz # should be "tar xvf control.tar.xz"
Also I don't think manually build fltk is necessary?
Hey again, @DanielYang59. Thanks for double checking! I missed that .xz
extension.
However, I just tested installing p4v in this way in a newly installed Ubuntu 22.04 virtual machine and in my case it seems I cannot skip building fltk.
I will update my previous message to include your correction and a missing dependence that made ubuntu minimal installations fail at extracting the deb packages.
All good mate, @pol-sb .
What error do you get then? I tried a fresh install on both my Ubuntu 22.04 WSL and another Ubuntu 22.04 physical machine, and finished without any problem.
Did you try my updated tutorial in the "README.ubuntu" from PR #24? It appears we just need to update the installation process of python-gtk2 and python-glade to match this name changes of Python2 (though I don't quite know since when this change was implemented). And other process remain unchanged (tested on both environments)
I think a good solution to this problem is to make an Appimage of this package
I think a good solution to this problem is to make an Appimage of this package
Make sense. I would see if I could build one. BTW there is docker image available. Anyone tried?
Make sense. I would see if I could build one. BTW there is docker image available. Anyone tried?
I'm trying to create an appimage, but yes I'm using it in a container (podman) and it's much less stressful.