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

Installation issue with Ubuntu 20.04LTS #18

Open
inandi2 opened this issue Jul 19, 2020 · 13 comments
Open

Installation issue with Ubuntu 20.04LTS #18

inandi2 opened this issue Jul 19, 2020 · 13 comments

Comments

@inandi2
Copy link

inandi2 commented Jul 19, 2020

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
Screenshot from 2020-07-18 21-03-07

@alpinnovianus
Copy link

i am also having this issue.

@Chengcheng-Xiao
Copy link
Contributor

Chengcheng-Xiao commented Dec 30, 2020

  1. p4vasp uses python2. If you have python2 installed then you should be good to go.
  2. the quick installation script is broken so you'll need to follow the step by step installation instruction.
  3. you will probably need to use this as well.

@guyanik
Copy link

guyanik commented Feb 1, 2021

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.

@bluepotatoes
Copy link

It's unclear to me whether python-glade2 is still distributed, especially for newer Ubuntu distros

@ginggs
Copy link

ginggs commented Oct 19, 2021

You'll need to stick with 18.04 LTS and there you can simply run sudo apt install p4vasp.

@DanielYang59
Copy link

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

jrbp pushed a commit to jrbp/p4vasp that referenced this issue Mar 1, 2023
We create new Kpoints classes to read and refine the data from the HDF5 file. This removes some logic from the Band class that more logically belongs to the Kpoints class. In the process, we change the logic such that different input modes for different KPOINTS files do not crash the Band class.
jrbp pushed a commit to jrbp/p4vasp that referenced this issue Mar 1, 2023
* Fix structure class when only charges are contained in Magnetism
* Fix vanishing magnetic moments
* Fix position of arrows for nonstandard cells
@pol-sb
Copy link

pol-sb commented Oct 19, 2023

@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.

@DanielYang59
Copy link

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?

@pol-sb
Copy link

pol-sb commented Oct 22, 2023

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.

@DanielYang59
Copy link

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)

@TheGreatDeadOne
Copy link

I think a good solution to this problem is to make an Appimage of this package

@DanielYang59
Copy link

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?

@TheGreatDeadOne
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants