How do you install PCL Library on Python/Ubuntu 18.04 LTS?
I've tried different ways to do so, without luck.
Trying to import pcl results in:
ImportError: libpcl_keypoints.so.1.7: cannot open shared object file: No such file or directory
Install it as a system-wide library, versus a Python module.
sudo add-apt-repository ppa:sweptlaser/python3-pcl
sudo apt update
sudo apt install python3-pcl
from here
I tried much to solve this issue. The drawback is here:
sudo apt-get install libpcl-dev -y
If you run this, it will install libpcl-dev with a higher version which will be conflicted with that libpcl-dev 1.7 you will install later. Here are some steps to raise the issue:
initially add Ubuntu 16 source list
then run below lines one by one.
sudo apt-get update
pip install python-pcl
sudo apt-get install libpcl-keypoints1.7
sudo apt-get install libpcl-outofcore1.7
sudo apt-get install libpcl-people1.7
sudo apt-get install libpcl-recognition1.7
sudo apt-get install libpcl-registration1.7
sudo apt-get install libpcl-segmentation1.7
sudo apt-get install libpcl-surface1.7
Now, if you get error "libpng12-0", do this:
sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt update
sudo apt-get install libpng12-0
sudo apt-get install libpcl-tracking1.7
sudo apt-get install libflann1.8
sudo apt-get install libpcl-visualization1.7
finally,
python
>>> import pcl
Congratulation : PCL is successfully imported
Related
I am trying to run an Arducam MT9J001 camera on a raspberry pi 3b+. I am getting the following error when I try to run the program, "ImportError: libcblas.so3: cannot open shared object file: No such file or directory." I have the computer vision software downloaded onto the raspberry pi, though it seems that it is still not working. I'm not sure what other information is viable to this project, but if there is something else I should be specifying please let me know.
What worked for me (I was missing some dependencies):
pip3 install opencv-python
sudo apt-get install libcblas-dev
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
sudo apt-get install libqtgui4
sudo apt-get install libqt4-test
You need to install only one package with neccessary shared object for it to work
sudo apt-get install libatlas-base-dev
Exact same solution as #thvs86 but here's a single 1 line copy-paste so you don't have to insert each command individually:
pip3 install opencv-contrib-python; sudo apt-get install -y libatlas-base-dev libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev libqtgui4 libqt4-test
How Can I upgrade my python3 version from 3.5.2 to 3.7 in AWS EC2 ubuntu instance?
i am getting ImportError: No module named 'secrets' error while trying to runserver using command python3 manage.py runserver. I read somewhere that secrets are not supported in python3 version 3.5, and it works for only higher versions. My python version is 3.5.2. I want to upgrade the version.
I tried sudo apt-get install python3.7, but its not working:
Building dependency tree Reading state information... Done
E: Unable to locate package python3.7
E: Couldn't find any package by glob 'python3.7'
E: Couldn't find any package by regex 'python3.7'
Then I tried sudo update-alternatives --config python3, this is also not working
update-alternatives: error: no alternatives for python3
Try this :
first do this:
sudo apt update
sudo apt install software-properties-common
Then
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install python3.7
reference : https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/
Try this:
sudo apt-get update
sudo apt-get install build-essential libpq-dev libssl-dev openssl libffi-dev zlib1g-dev
sudo apt-get install python3-pip python3.7-dev
sudo apt-get install python3.7
In case you don't have the repository and so it fires a not-found package you first have to install this:
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
I am using a virtual box to build network simulator 3(ns3), Ubuntu version: Linux Server 20.04 LTS
the Linux command that I had executed are
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gcc g++ python python3 -y
sudo apt-get install python3-setuptools git mercurial -y
sudo apt-get install zip unzip
apt-get install cmake libc6-dev libc6-dev-i386 libclang-6.0-dev llvm-6.0-dev automake -y
sudo apt-get install -y python-gi-cairo
sudo apt-get install -y gir1.2-gtk-3.0
sudo apt-get install -y python-dev
sudo apt-get install -y python3-dev
sudo apt-get install -y qt5-default
sudo apt-get install -y python3-pygraphviz
sudo apt install python3-pip
sudo apt-get install -y graphviz libgraphviz-dev
sudo pip3 install pygraphviz --install-option='--include-path=/usr/include/graphviz' --install-option='--library-path=/usr/lib/graphviz'
Then I use the bake to install the ns3 through following this page: install ns3 with bake
although the "bake.py show" tell me that pygraphvix is Missing, but since it is not an essential dependency, so I ignore it and continue build the ns3
after i successfully built the ns3, I follow the instruction here to execute the "./waf shell" command in the folder "/source/ns-3.29"
then I run the command and get the error:
root#ns3simulator:/home/ns3/source/ns-3.29# python3 examples/wireless/mixed-wired-wireless.py
Traceback (most recent call last):
File "examples/wireless/mixed-wired-wireless.py", line 54, in <module>
import ns.applications
ModuleNotFoundError: No module named 'ns'
Could anyone please help me for this?Thanks in advance.
The problem
"import ns.applications"
ModuleNotFoundError: No module named 'ns'
is because there is a problem with the ns-3 installation and it is not able to do python binding itself and you need to manually configure it.
In my case, I have python 2.7 also installed
Go to
-> cd [PATH-to-your-ns3.29]
-> /usr/bin/python2.7 ./waf configure
it will enable the python binding like this
Waf configuration
after this when you can see the python binding enabled you can run your python script without any error.
Hope it helps !!!
./ns3 configure --enable-python-bindings
Then run the python example. The libraries should get built.
Here
I have installed raspbian os on raspberry pi 3 model b. I have to perform a project which involves use of h5py.
The os already came preinstalled with python 2.7 and 3.5
With the help of pip, I installed h5py and it was successful, for python 3.5.
ImportError: libhdf5_serial.so.100: cannot open shared object file: No such file or directory
I don't know how to proceed with this error, can somebody please point out an appropriate way to handle this error?
I met the same question as yours, and you can use the website below to solve it: https://www.howtoinstall.co/en/debian/stretch/
In generally, you will find these commands similarly.
sudo apt-get update
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-serial-dev
Besides, you can visit my blog about this problem. It's written in Chinese, so maybe you need http://translate.google.com
Install all of these packages
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libcblas-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
sudo apt-get install libqtgui4
sudo apt-get install libqt4-test
https://stackoverflow.com/a/53402396/2696230
I came across a tutorial which lists a number of libraries to install before installing Django (I am using Ubuntu 14.04, Python3, and Django 1.8):
$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get install -y build-essential
$ sudo apt-get install python-setuptools python-dev python3.4-dev python-software-properties libpq-dev
$ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev
$ sudo apt-get build-dep python-imaging
But other tutorials may not list so many libraries to install. I wonder which are absolutely necessary, and others may be omitted?
You only need to install these dependencies if you want image processing via pillow and if you plan on installing it via pip (the Python package manager) rather than apt-get (Ubuntu's package manager).
Since you're using a virtualenv, you will need to install this package from source. The following commands will get the build dependencies and install pillow using pip.
$ sudo apt-get build-dep python3-imaging
$ pip install pillow
Note that pillow is a beast to compile. Be prepared to wait several minutes.