Install VI-Suite on Ubuntu 18.04

238 views
Skip to first unread message

武政孝治

unread,
Aug 12, 2018, 8:32:20 PM8/12/18
to VI-Suite
Hi.

I set Ubuntu 18.04's default Python to 3.6. And I installed the following.
Python 3-numpy
Python 3-matplotliib
Python 3-kivy
Python 3-sip
Python 3-six
Python 3-dateutil
Python 3-pyparsing
Python 3-pyqt 4
Python 3-pyside
Python 3-psutil
Python 3-pandas
Python 3-scipy

I copied visuite 0413 to $ HOME /. Config / blender / 2.79 / scripts / addons /.
And if you run simulation from blender and attempt to create a graph, an error will occur like the attached image. What's wrong. You can use it without problems with ArchLinux.

Regards.
Koji Takemasa (Ph. D.)

スクリーンショット_2018-08-13_09-12-50.png

Ryan Southall

unread,
Aug 24, 2018, 11:18:07 AM8/24/18
to VI-Suite
Dear Koji.
This error usually means that matplotlib has not been imported correctly. Typing 
import matplotlib 
and  
import matplotlib.pyplot as plt 
into Blender's Python console will hopefully give you a more detailed message.

I think I have finally managed to get the VI-Suite to run on Ubuntu 18.04. You can download it from here. If you have time please test it and let me know if there are problems as some things do not work for me but I think that is because I am running Ubuntu under a virtual machine. 

To create this package I had to:
1) Download Blender 2.79b archive from Blender.org for your platform and extract the archive
2) Download the Python 3.5.3 source tarball from  https://www.python.org/downloads/release/python-353/ and extract the archive
3) Within the downloaded Python folder run ./configure --prefix=destination  where destination is the place you want the built Python folder to be. Then run make then run make install
4) In the built Python directory go to the bin folder and run
./python3.5m -m pip install setuptools
./pyhton3.5m -m pip install cython
./python3.5m -m pip install psutil
./python3.5m -m pip install "pyqt5<5.11"
./python3.5m -m pip install matplotlib
./python3.5m -m pip install kivy

5) Replace the python folder in the Blender download/2.79 folder with the built python folder. It has to have the same name i.e. python.
6) Make sure you have installed all the SDL2 libraries in Ubuntu for kivy.
7) Install the VI-Suite addon.

With any luck you will have a fully functional Ubuntu installation.

Regards
Ryan

武政孝治

unread,
Aug 24, 2018, 9:20:50 PM8/24/18
to VI-Suite
Thanks Ryan.

Thank you. I'll give it a try. 

On September 6, I will present the "VI - Suite as a passive design tool" at the Japan Institute of Architecture. 

The place will be held from September 4th to September 6th at Tohoku University. 

Many friends and young researchers will participate.

Regards.

武政孝治

unread,
Aug 25, 2018, 3:25:34 AM8/25/18
to VI-Suite
Hi.
I installed the following files.

$ sudo apt install build-essential
$ sudo apt install ffmpeg
$ sudo apt install libsdl2-dev
$ sudo apt install libsdl2-image-dev
$ sudo apt install libsdl2-mixer-dev
$ sudo apt install libsdl2-ttf-dev
$ sudo apt install libportmidi-dev
$ sudo apt install libswscale-dev
$ sudo apt install libavformat-dev
$ sudo apt install libavcodec-dev
$ sudo apt install libssl-dev

I have created a work directory called SRC. I downloaded Python-3.5.6.tgz there and extracted it as follows.

$ tar zxvf Python-3.5.6.tgz
$ cd Python-3.5.6
$ ./configure --prefix=$HOME/SRC/python  --with-ensurepip
$ make
$ make install

Next time I installed the following in python / bin.

$ ./python3.5m -m pip install setuptools
$ ./pyhton3.5m -m pip install cython
$ ./python3.5m -m pip install psutil
$ ./python3.5m -m pip install "pyqt5<5.11"
$ ./python3.5m -m pip install matplotlib
$ ./python3.5m -m pip install kivy
$ ./python3.5m -m pip install pandas
$ ./python3.5m -m pip install scipy

Next I downloaded and unpacked blender-2.79b-linux-glibc 219-x86_64.tar.bz2.
I changed the name to blender 2.79b. Also download and unpack visuite 0413a-lin.tar.gz.

$ cd blender2.79b/2.79
$ rm -r python
$ cp -r $HOME/SRC/python ./
$ cd scripts/addons
$ cp -r $HOME/SRC/visuite0413 ./
$ cd ~/SRC
$ sudo cp -r blender2.79b /usr/local

The following error is displayed when drawing an annual graph.

Regards



2018年8月25日土曜日 10時20分50秒 UTC+9 武政孝治:
スクリーンショット_2018-08-25_16-21-16.png

Ryan Southall

unread,
Aug 25, 2018, 5:33:47 AM8/25/18
to VI-Suite
Make sure you are using Python 3.5.3 not Python 3.5.6.
Did the link work? That already contains the custom built Python 3.5.3.

武政孝治

unread,
Aug 25, 2018, 10:32:20 PM8/25/18
to VI-Suite
Hi.

With Python 3.5.3 I can run VI - Suite. Thank you very much.

Regards

Koji Takemasa (Ph. D.)

スクリーンショット_2018-08-26_11-27-36.png

武政孝治

unread,
Aug 26, 2018, 2:33:35 AM8/26/18
to VI-Suite
Hi.

Scatter.png is not displayed. The size of the file is null.

Regards.

2018年8月26日日曜日 11時32分20秒 UTC+9 武政孝治:

Ryan Southall

unread,
Aug 26, 2018, 3:15:52 PM8/26/18
to VI-Suite
Hi Koji.

I think the error is because I forgot there is another problem on Ubuntu which is that Blender is compiled with libpng 1.2 and matplotlib gets installed with libpng 1.6, which are incompatible. The good news is I have found a solution, the bad news is that it is rather complex.
Matplotlib needs to be built with libpng1.2, which is no longer available for Ubuntu 18.04. The download link I sent before has been updated with a matplotlib built against libpng 1.2, but you may need to install the deb file from step 2 below for it to work.


If you want to build it yourself then:
1) Remove the matplotlib installation from your Blender's python folder ./python3.5m -m pip uninstall matplotlib
2) Get the libpng 1.2 files in deb format from here
3) Get the libpng-dev 1.2 files in deb format from here
4) Extract these two debs and merge the folders contained within the data.tar.xz archives into a new libpng folder which then contains 'usr' and 'lib' directories.
5) Copy the libpng12.a  and libpng12.so files from the usr/lib/x86_64-linux-gnu folder to /usr/local/lib
6) Download the latest matplotlib source code and extract the folder.
7) Edit the setupext.py file in the matplotlib folder and change the base_dir dictionary on line 179 to include a new 'linux' entry which contains the path to the usr folder in the new libpng folder e.g. 

'aix5': ['/usr/local'],
'linux': ['path_to_png_folder/usr']

Also edit line 1289 so that instead of saying 
status, output = getstatusoutput("libpng-config --version")
it says
status, output = getstatusoutput("path_to_png_folder/usr/bin/libpng-config --version")

Also change line 1312 so that instead of saying
alt_exec='libpng-config --ldflags')
it says 
alt_exec='path_to_png_folder/usr/bin/libpng-config --ldflags')

7) Enter the matplotlib folder with the terminal.
8) Type export PKG_CONFIG_PATH=/pngfolder/usr/lib/x86_64-linux-gnu/pkgconfig where pngfolder is the address of the libpng folder you created in step 4.
9) Run /path_to_Blender's_python/ setup.py install  where path_to_Blender's_python is the address of the python3.5m executable in Blender's python folder.


Also on my virtual machine Blender crashes when I try and save an image file from a matplotlib window. You might want to check this on your system as well.

武政孝治

unread,
Aug 26, 2018, 7:29:16 PM8/26/18
to VI-Suite
Hi.

Thank you for your reply. I think the method shown is difficult for me. I will try.
I have a question. Is this a problem caused by Ubuntu 18.04? Can I avoid this problem if I use Ubuntu 16.04?


2018年8月27日月曜日 4時15分52秒 UTC+9 Ryan Southall:

Ryan Southall

unread,
Aug 26, 2018, 8:26:47 PM8/26/18
to VI-Suite
Not sure. In theory if 16.04 allows you to install version 1.2 of libpng and libpng-dev and have them as the default libpng then my last post may not be necessary and the scatter display may work.

武政孝治

unread,
Aug 28, 2018, 7:16:09 PM8/28/18
to VI-Suite
Hi.

It is not going well. I will temporarily suspend work as I will create a PowerPoint of the Architectural Institute of Japan.

 I will try again when I finish creating PowerPoint. Attached is an outline of the Japanese Society of Architecture. Unfortunately the abstract is in Japanese.

Regard.

Koji Takemasa (Ph.D.)

2018年8月27日月曜日 9時26分47秒 UTC+9 Ryan Southall:
On VI-Suite as PASSIVE Design Tool.pdf

Sergio Bini

unread,
Sep 5, 2018, 4:41:02 AM9/5/18
to VI-Suite
Excuse me if I put in the dicussion, but if you try the steps that you have describe in the first post, in Linux Mint 19 wich is based on Ubuntu 18.04, without the needed to switch to another Python version, but simply selecting the package trough the software manager then the only step you have to do is install the VI-suite trough the addon manager in Blender.
To be sure that all works you have to install Blender 3D trough the package manager after adding this ppa  sudo add-apt-repository ppa:thomas-schiex/blender
then launch
sudo apt-get update
sudo apt-get install blender

I suggest, after downloaded the VI suite, to unpack it in a place you want (es. desktop) then select the VISuite0.413 folder and with the right click pack it as .zip file.
Then open blender and in the user preferences use the button install add-on from file and choose VISuite0.4.13.zip. Finally activate the suite and save user preferences.
I hope this could be useful, because ther/s a lot of people that use the debian based distributions, and it could be a pity not to use this excellent piece of software.

Regards

P.S:in this way for me there's no crash when I try to save a graph.

Ryan Southall

unread,
Sep 5, 2018, 10:13:10 AM9/5/18
to VI-Suite
Cheers Sergio.
I'll try this on a vanilla 18.04 and see if it works too. Out of interest if you type ldd path_to_blender_executable  in a terminal what do you get on the libpng line?
Regards
Ryan

Sergio Bini

unread,
Sep 6, 2018, 4:13:31 AM9/6/18
to VI-Suite
Hi Ryan,
I'm not sure, but maybe this is the text you have asked for.
Regards
attach.txt

Ryan Southall

unread,
Sep 6, 2018, 8:35:00 AM9/6/18
to VI-Suite
Yes, that's the one.
Looks like the Blender from the PPA uses the installed libpng, which is version 1.6. This should indeed make life a lot easier.

武政孝治

unread,
Sep 7, 2018, 11:28:48 PM9/7/18
to VI-Suite
Hi Ryan
Hi Sergio

I installed Linux mint and confirmed that VI - Suite works now. Thank you very much. I will use LiVi etc. from now.

I presented VI - Suite at the Japan Institute of Architecture. Many young researchers were interested in VI - Suite.

Regards

Koji Takemasa (Ph. D.)


2018年9月6日木曜日 21時35分00秒 UTC+9 Ryan Southall:

Paolo Cavatore-Ercole

unread,
Jul 4, 2019, 11:25:43 AM7/4/19
to VI-Suite
Hi everybody!

I downloaded Ryan's compressed file (the "complete" version with blender and all the required python dependencies) attached in his post on 24th of August 2018 and extracted in my old Linux Mint 18 Cinnamon 64bit (based on Ubuntu Xenial):
I can confirm it seems to work perfectly!
Until now I only tested Shadow analisys, but I'll do more test in the next days since VI-Suite seems really an amazing piece of software.

[ Just for troubleshooting I specify what follows:
Before this "complete" version I tried to install VI-Suite in a regular blender 2.79b installation like any addon, but I failed even if I installed all the required pakages for python3 and python3.5 from my package-manager. Probably that's because I couldn't force blender to load the system python (instead of his bundled version). I didn't uninstall those packages before using the Ryan "complete" version, but I think this has nothing to do with the next success. ]

So, as mentioned, I downloaded and extracted the complete ver in a folder separate from the other branches and versions of blender I got on my drive.
In order to have separate preferences.blend (where I activated the VI-Suite addon) and other configurations, I did what's called a "portable" install, so I created a separate "config" folder inside of visuite0413a-bionic/2.79/ and copied there preferences.blend, startup.blend and the other files taken from a regular userpreferences folder (/home/<username>/.config/blender/2.79/config/). [All the steps for Windows systems described here]. Also, I symlinked some addons I needed from the regular addons folder to visuite0413a-bionic/2.79/scripts/addons/  in order to avoid duplicate installations.

I hope VI-Suite could be ported to Blender 2.80 soon!
Best Regards

Paolo Cavatore

Ryan Southall

unread,
Jul 4, 2019, 11:28:14 AM7/4/19
to VI-Suite
Thanks for the feedback Paolo.
Regards
Ryan 
Reply all
Reply to author
Forward
0 new messages