how to solve the glm problem when installing pymol? - glm

I am trying to install pymol in CentOS 7 system. I installed the dependency glm-devel-0.9.6.3-1.el7.noarch by yum:
sudo yum install glm-devel.
During compiling I got an error related to glm as following:
layer1/SceneView.cpp:34:61: error: no matching function for call to ‘equal(const vec3&, const vec3&, float)’
Could anyone tell why this error appears?
I will appreciate any help!
Best regards.

install pymol in CentOS 7
Build example with updated glm-devel
# yum install mmtf-cpp-devel.x86_64 glew-devel.x86_64 libpng-devel freetype-devel msgpack-devel libxml2-devel python36-qt5-devel.x86_64 freeglut-devel mesa-libGL-devel.x86_64 python3-devel
# yum install ./glm-devel-0.9.9.6-6.el7.noarch.rpm
## works with the default python3 (3.6.8) and g++ -4.8.5
Link, glm-devel-0.9.9.6-6.el7 https://drive.google.com/file/d/1BXygEWqpvlbZg867dsXuW47T67Z0V0Q8/view?usp=sharing
https://github.com/schrodinger/pymol-open-source →
https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL
git clone https://github.com/schrodinger/pymol-open-source.git
cd pymol-open-source/
python3 setup.py build
# python3 setup.py install
pymol ## the pymol GUI opens OK
There is also a binary version available, with python 3.7 included : https://pymol.org/2/ →
https://pymol.org/installers/PyMOL-2.5.2_293-Linux-x86_64-py37.tar.bz2 → tar xvf PyMOL-2.5.2_293-Linux-x86_64-py37.tar.bz2
cd pymol/ && ./pymol

Related

opencv import error (libopencv_dnn.so.4.5 undefined symbol)

I'd like to utilize my Movidius Neural Compute Stick 1 (NCS1) to learn deep learning.
However, when I run a sample code, the following import error occurs:
python3 emotion.py -i sample.jpg -o result.jpg
Traceback (most recent call last):
File "emotion.py", line 1, in <module>
import cv2
File "/opt/intel/openvino/python/python3/cv2/__init__.py", line 129, in <module>
bootstrap()
File "/opt/intel/openvino/python/python3/cv2/__init__.py", line 112, in bootstrap
import cv2
ImportError: /opt/intel/openvino/opencv/lib/libopencv_dnn.so.4.5:
undefined symbol: _ZN15InferenceEngine5TBlobIhSt9enable_ifILb1EvEED1Ev
I'm using a Raspberry Pi 3B.
The OS is Raspberry Pi OS 32-bit (Legacy) Buster because Bullseye doesn't support NCS1.
OpenVINO Version is l_openvino_toolkit_runtime_raspbian_p_2020.3.194.tgz,
which is the last version that supports NCS1.
Here's how to reproduce.
I installed Raspberry Pi OS 32-bit (Legacy) Buster onto the microSD.
After some simple initial settings, I typed these commands to install the OpenVINO toolkit:
sudo mkdir -p /opt/intel/openvino
mkdir ~/download
cd ~/download
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2020.3/l_openvino_toolkit_runtime_raspbian_p_2020.3.194.tgz
sudo tar -xf l_openvino_toolkit_runtime_raspbian_p_2020.3.194.tgz --strip 1 -C /opt/intel/openvino
echo "source /opt/intel/openvino/bin/setupvars.sh" >> ~/.bashrc
source /opt/intel/openvino/bin/setupvars.sh
sudo usermod -a -G users "$(whoami)"
sh /opt/intel/openvino/install_dependencies/install_NCS_udev_rules.sh
In order to set up the OpenCV environment, I typed:
sudo apt update
sudo apt install -y python3-pip
sudo apt install -y libopencv-dev
sudo apt install -y python3-numpy
pip3 install pillow
That's it.
Then, I downloaded necessary images and codes, and ran emotion.py.
The whole contents of emotion.py doesn't matter here because only the first line gives me the error.
more -10 emotion.py
import cv2
import numpy as np
from PIL import ImageFont, ImageDraw, Image
import argparse
import sys
from openvino.inference_engine import IECore
frame_png = cv2.imread("frame_main.png", cv2.IMREAD_UNCHANGED)
face_png = cv2.imread("frame_face.png", cv2.IMREAD_UNCHANGED)
gender_png = cv2.imread("frame_gender.png", cv2.IMREAD_UNCHANGED)
Addtional Info:
pi#raspberrypi:~ $ python -VV
Python 2.7.16
pi#raspberrypi:~ $ python3 -VV
Python 3.7.3 (default, Oct 31 2022, 14:04:00)
[GCC 8.3.0]
Also, I tried to use berry-conda to do a similar thing with this answer.
But, it failed because the package libprotobuf is missing:
(After berry-conda installation)
pi#raspberrypi:/tmp $ which python
/home/pi/berryconda3/bin/python
pi#raspberrypi:/tmp $ which conda
/home/pi/berryconda3/bin/conda
pi#raspberrypi:/tmp $ python --version
Python 3.6.1
pi#raspberrypi:/tmp $ conda install -c defaults libprotobuf protobuf
Fetching package metadata .....
PackageNotFoundError: Package missing in current linux-armv7l channels:
- libprotobuf
This berry-conda installation completely changed my previous environment above.
I don't know if I should keep using berry-conda
or re-install Raspberry Pi OS 32-bit (Legacy) Buster again to do it from scratch.
Any suggestions would be greatly appreciated.
The error message is indicating that there is an issue with an undefined symbol in the libopencv_dnn.so.4.5 library, which suggests that there may be a compatibility issue between OpenVINO and the version of OpenCV installed on your system.
You could try reinstalling OpenVINO and making sure that it is properly configured with your system's version of OpenCV. You could also try updating or reinstalling OpenCV.

"cdk" command not found after installing python version

The "cdk" command is not found after installing with "pip install --upgrade aws-cdk.core" (per the docs).
The package successfully installs because it is found in the "site-packages" directory.
tennis.smith at C02TM089GY6N in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
$ ls
README.txt cattr/ docopt-0.6.2.dist-info/ pip/ requests-2.22.0.dist-info/ typing_extensions.py
__pycache__/ cattrs-0.9.0.dist-info/ docopt.py pip-19.3.dist-info/ setuptools/ urllib3/
attr/ certifi/ easy_install.py pkg_resources/ setuptools-41.2.0.dist-info/ urllib3-1.25.6.dist-info/
attrs-19.3.0.dist-info/ certifi-2019.9.11.dist-info/ idna/ publication-0.0.3.dist-info/ six-1.12.0.dist-info/ wheel/
aws_cdk/ chardet/ idna-2.8.dist-info/ publication.py six.py wheel-0.33.6.dist-info/
aws_cdk.core-1.13.1.dist-info/ chardet-3.0.4.dist-info/ jsii/ python_dateutil-2.8.0.dist-info/ tests/ yarg/
aws_cdk.cx_api-1.13.1.dist-info/ dateutil/ jsii-0.19.0.dist-info/ requests/ typing_extensions-3.7.4.dist-info/ yarg-0.1.9.dist-info/
Any ideas why it isn't being detected?
To install the CDK CLI run npm install -g aws-cdk.

avahi compilation error "libgdbm.so not found" ubuntu 16.04?

Getting libgdbm.so not found error, couldn't resolve even after installing proper package. Also I couldn't find proper documentation on compiling from source and installing.
To build avahi on Ubuntu I would suggest the following steps:
sudo apt-get build-dep avahi # (you'll need to have enabled deb-src lines in /etc/apt/sources.list for this to work, or you can use the software settings to enable source packages)
Then additionally install xml2man and python-gi-dev
sudo apt install python-gi-dev xml2man
Then configure with these options:
./configure --disable-gtk --disable-qt3 --disable-mono
Avahi always errors about a build dependency it can't find, requiring you to explicitly disable those items. Above I suggest to disable some old toolkits (gtk2 and qt3) plus mono support. If you get other errors you can generally use a similar --disable-X option to disable those. But for Ubuntu generally you can compile almost everything else.
gtk and qt3 is disabled by default in the latest git, but not the latest release.
A quick place to check for the required ubuntu deps would be the travis configuration: https://github.com/lathiat/avahi/blob/master/.travis.yml
Out of curiosity, what is the reason you're building from source? The Avahi packages in Ubuntu 16.04 should work well.
Compilation steps:
1) Install dependency
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
sudo apt-get install libqt4-dev libtool libglib2.0-dev intltool build-essential libgtk2.0-dev libdaemon-dev xmltoman
2) Generate configure file
bash autogen.sh
Ignore following error
checking for QT5... no
configure: error: Package requirements ( Qt5Core >= 5.0.0 ) were not met:
No package 'Qt5Core' found
3) Create makefile
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--disable-mono \
--disable-monodoc \
--disable-python \
--disable-qt3 \
--disable-qt4 \
--disable-qt5 \
--disable-gdbm \
--enable-core-docs \
--with-distro=none \
--with-systemdsystemunitdir=no \
--disable-shared \
--disable-gtk
4) Make and install
make
sudo make install
[Edit] if debugging with custom logs/code use --disable-shared in configure else changes wont reflect.

error package docker-ce requires container-selinux = 2.9 centos 7

Command: yum -y install docker-ce
Result:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:18.06.0.ce-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-18.06.0.ce-3.el7.x86_64
--> Finished Dependency Resolution
Error: Package: docker-ce-18.06.0.ce-3.el7.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2.9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Resolved with installing container-selinux-2.9 dependency with following command:
sudo yum install ftp://bo.mirror.garr.it/1/slc/centos/7.1.1503/extras/x86_64/Packages/container-selinux-2.9-4.el7.noarch.rpm
Use below link to install container-selinux from a trust able source
sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.55-1.el7.noarch.rpm
Steps to install Docker-CE on RHEL 7.5
https://github.com/dineshsood/dockers/wiki
This docker-ce version worked for me:
sudo yum -y install docker-ce-cli.x86_64 1:19.03.5-3.el7
Best of luck!
You can enable the Extras repository in the path:
/etc/yum.repos.d/CentOS-Base.repo
You need to enable CentOS "extras" repository.
Here's how I did it:
Open /etc/yum.repos.d/CentOS-Base.repo
Duplicate contents of the file, so it becomes twice as long
Replace /os/ in the URL with /extras/
Change the section title in square brackets
E.g.:
[CentOS-Base]
name=CentOS 7 Base Mirror
baseurl=http://mirror.centos.org/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[CentOS-Extras]
name=CentOS 7 Extras
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Then try installing docker again
I had to add --nogpgcheck to the selected answer de to an error
Public key for container-selinux-2.9-4.el7.noarch.rpm is not installed

Niftynet: autocontext_mr_ct_model_zoo error: Unknown keywords in config file

I have just started exploring NiftyNet.I am getting the following error when I try to run the autocontext_mr_ct_model_zoo.
When I run the following command:
python net_regress.py train \ -c ~/niftynet/extensions/autocontext_mr_ct/net_autocontext.ini \
--starting_iter 0 --max_iter 500*
I get the following error message:
ValueError: Unknown keywords in config file: [error_map] -- all possible choices are ['', u'loss_border', 'output', 'image', 'weight', 'sampler', u'cuda_devices', u'num_threads', u'num_gpus', u'model_dir', u'dataset_split_file', u'name', u'activation_function', u'batch_size', u'decay', u'reg_type', u'volume_padding_size', u'window_sampling', u'queue_length', u'multimod_foreground_type', u'histogram_ref_file', u'norm_type', u'cutoff', u'foreground_type', u'normalisation', u'whitening', u'normalise_foreground_only', u'weight_initializer', u'bias_initializer', u'weight_initializer_args', u'bias_initializer_args', u'optimiser', u'sample_per_volume', u'rotation_angle', u'rotation_angle_x', u'rotation_angle_y', u'rotation_angle_z', u'scaling_percentage', u'random_flipping_axes', u'lr', u'loss_type', u'starting_iter', u'save_every_n', u'tensorboard_every_n', u'max_iter', u'max_checkpoints', u'validation_every_n', u'validation_max_iter', u'exclude_fraction_for_validation', u'exclude_fraction_for_inference', u'inference_iter', u'save_seg_dir', u'output_interp_order', u'border', u'csv_file', u'path_to_search', u'filename_contains', u'filename_not_contains', u'interp_order', u'pixdim', u'axcodes', u'spatial_window_size'].
I'm not quite sure what I've messed up here, any advice welcomed.
Looks like the source code you downloaded is out-of-date, are you running the command with the latest version of NiftyNet?
The pip package is slightly out-of-date at the moment,
you could have the latest source code by running
git clone https://github.com/NifTK/NiftyNet.git
# installing dependencies from the list of requirements
cd NiftyNet/
pip install -r requirements-gpu.txt
# run command from the source code folder
python net_regress.py train \
-c ~/niftynet/extensions/autocontext_mr_ct/net_autocontext.ini \
--starting_iter 0 --max_iter 500

Resources