I'm having some trouble build libcamera into my Ubuntu machine.
I'm following the instructions, but it fails during ninja -C build install
This is the error:
felipe# ninja -C build install
ninja: Entering directory `build'
[1/2] Installing files.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 129, in run
return options.run_func(options)
File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 514, in run
installer.do_install(datafilename)
File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 330, in do_install
d = pickle.load(ifile)
AttributeError: Can't get attribute 'OctalInt' on <module 'mesonbuild.coredata' from '/usr/lib/python3/dist-packages/mesonbuild/coredata.py'>
FAILED: meson-install
/home/felipe/.local/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
Not sure how to follow from here.
I've tried updating everything, even removing and reinstalling meson but it didn't work.
It looks as possible that you face what is described in the end of instructions (your link) - you have system and local meson installations of different versions, so
If a version of meson which is different from the system-wide version
is already installed, uninstall that meson using pip3, and install
again without the --user argument.
And finally (while writing) I found confirmation of my suspicion here.
Related
I am trying to install python3.8.1 on a RHEL 7 server. It is an offline installation.
The python folder is untared and stored in a folder in the server.
After redirecting myself into the folder where the setup.py file is located. I run
master1 Python-3.8.1]$ sudo python setup.py install-sh
File "setup.py", line 1023
libraries=[panel_library, *curses_libs]))
^
SyntaxError: invalid syntax
I cant find a solution. Appreciate help
You are trying to install python with source code zipped in tgz. So, you will need to compile it and then install it.
Once you unzip, refer readme.rst file.
Build Instructions
On Unix, Linux, BSD, macOS, and Cygwin::
./configure
make
make test
sudo make install
This will install Python as python3.
I think you are using command to install packages offline using setup.py, that won't work for python fresh installation
I'm trying to integrate a ROS package into our system for a research project and the cv_bridge package and python3 is needed in order to get the package working. Currently I can't get the cv_bridge package to build in python3 despite multiple steps, constantly builds in python2 directory.
Working in Ubuntu 16.04 with ROS kinetic. Using python3.5
Error Message:
[ERROR] [1563897986.999724]: bad callback: <function color_callback at 0x7f00ffa06598>
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
cb(msg)
File "/home/rival/Documents/Repos/ROS/src/rcnn_apple_detector/detection.py", line 84, in color_callback
image = bridge.imgmsg_to_cv2(image_msg, "bgr8")
File "/home/rival/Documents/Repos/ROS/src/vision_opencv/cv_bridge/python/cv_bridge/core.py", line 163, in imgmsg_to_cv2
dtype, n_channels = self.encoding_to_dtype_with_channels(img_msg.encoding)
File "/home/rival/Documents/Repos/ROS/src/vision_opencv/cv_bridge/python/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels
return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding))
File "/home/rival/Documents/Repos/ROS/src/vision_opencv/cv_bridge/python/cv_bridge/core.py", line 91, in encoding_to_cvtype2
from cv_bridge.boost.cv_bridge_boost import getCvType
ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)
I've tried the steps in this previous question's answer:
Unable to use cv_bridge with ROS Kinetic and Python3
"You are right, you should build cv_bridge with python3.
You can do it with passing -DPYTHON_EXECUTABLE=/usr/bin/python3
-DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so args to cmake. Or, if you are using catkin to build packages, you can do next
steps:"
The only variations to the steps is I have to use catkin_make because issues with a bunch of older packages I'm using aren't currently working with catkin build. I don't know if that is causing it or not. But I pass the cmake arguments into my workspace and still it targets to the ROS python2 directory.
Location cv_bridge is currently still being built:
/opt/ros/kinetic/lib/python2.7/dist-packages
Version:
apt-cache show ros-kinetic-cv-bridge | grep Version
Version: 1.12.8-0xenial-20190320-142632-0800
catkin config:
-------------------------------------------------------------------------------------------------------------------------------------------------
Profile: default
Extending: [env] /home/rival/Documents/Repos/ROS/devel:/opt/ros/kinetic
Workspace: /home/rival/Documents/Repos/ROS
---------------------------------------------------------------------------------------------------------------------------------------------------
Build Space: [exists] /home/rival/Documents/Repos/ROS/build
Devel Space: [exists] /home/rival/Documents/Repos/ROS/devel
Install Space: [missing] /home/rival/Documents/Repos/ROS/install
Log Space: [missing] /home/rival/Documents/Repos/ROS/logs
Source Space: [exists] /home/rival/Documents/Repos/ROS/src
DESTDIR: [unused] None
---------------------------------------------------------------------------------------------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: merged
---------------------------------------------------------------------------------------------------------------------------------------------------
Additional CMake Args: -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
---------------------------------------------------------------------------------------------------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
---------------------------------------------------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.
Exact steps taken:
sudo apt-get install python-catkin-tools python3-dev python3-catkin-pkg-modules python3-numpy python3-yaml ros-kinetic-cv-bridge
catkin clean
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
cd src/vision_opencv/
git checkout 1.12.8
catkin_make cv_bridge
source devel/setup.bash --extend
I expect cv_bridge to be built with the cmake arguments but it still gets targeted back into the python2 directory. It seems the cmake args are being ignored/not targeting correctly.
I followed this blog post.
Essentially you need to create new catkin workspace so that its configuration doesn't mess with your original (python2) workspace.
Install python3 and dependencies. I like using --user without sudo to make resolving dependency conflicts a little easier.
sudo apt-get install python-catkin-tools python3-dev python3-numpy
sudo apt-get install python3-pip python3-yaml
pip3 install rospkg catkin_pkg --user
Make a new workspace
mkdir py3_catkin_ws
cd py3_catkin_ws
mkdir src
Init catkin with python3 configured (use your python3x version)
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
catkin config --install
Clone and catkin build vision_opencv in your new workspace. Continue as usual. Python3 should now be able to locate cv_bridge. The blog post suggests to source install/setup.bash --extend but it wasn't necessary in my case.
I was having the same issue under ROS Melodic, Ubuntu 18.04 and using conda to separate the environments. I started to get some strange errors, like NumPy not being found. At this point it was too much of a hassle and a possible waste of time.
This was especially annoying as I could launch my ROS node using Python 3 and OpenCV worked perfectly well, only the transfer from ROS to CV was missing...
I ended up just copying the lines from cv_brdige that did the translation to my package and made the translation without importing cv_bridge package.
As ROS is getting more Python 3 friendly, and packages will hopefully follow, this will not be an issue in the future.
Hi I am trying to install nodejs in ubuntu 14 but getting following error.
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 62%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 100%
dpkg: cannot scan updates directory `/var/lib/dpkg/updates/': No such file or directory
E: Sub-process /usr/bin/dpkg returned an error code (2)
when trying to installing with software updated I am getting following error.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/aptdaemon/worker.py", line 300, in _process_transaction
not self.is_dpkg_journal_clean()):
File "/usr/lib/python3/dist-packages/aptdaemon/worker.py", line 1111, in is_dpkg_journal_clean
for dentry in os.listdir(status_updates):
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/dpkg/updates/'
I had this problem previously, I removed any variables equivalent to zero and it solved it, perhaps try that.
Add the Node.js-maintained repositories to your Ubuntu package source list with this command:
curl -sL https://deb.nodesource.com/setup | sudo bash -
Then install Node.js with apt-get:
sudo apt-get install nodejs
Optionally we can create a symbolic link for node (for reasons mentioned earlier):
sudo ln -s /usr/bin/nodejs /usr/bin/node
Using this install option, we end up with newer versions of Node.js and npm:
$ node -v
$ npm -v
to check node version and npm version
I suggest installing nvm (node version manager)
https://github.com/creationix/nvm
it allows you to install and use ANY node version, and this may be way better, because ubuntu is bound to one specific version. In web development, every project is prepared using dofferen node, so switching it might be necessary
I am getting the error as follows in cygwin
$ make
g++ -O3 -W -Wall -g -c -o ImageIOpng.o ImageIOpng.cpp
ImageIOpng.cpp:19:17: fatal error: png.h: No such file or directory
compilation terminated.
make: *** [<builtin>: ImageIOpng.o] Error 1
After followin to this answer. png.h file not found - Linux,
I had error in the following,
$ sudo apt-get install libpng-dev
-bash: /usr/bin/sudo: Permission denied
I have read that in Linux, I don't need to write sudo, instead of that I can use yum. So, I have tried yum install. But, it says
Traceback (most recent call last):
File "/usr/bin/yum", line 22, in <module>
import yummain
File "/usr/share/yum/yummain.py", line 22, in <module>
import clientStuff
File "/usr/share/yum/clientStuff.py", line 18, in <module>
import rpm
ImportError: No module named rpm
Almost, in every steps, I am getting errors. What was the problem? yum is very useful package, but it seems installed not correctly.I have installed yum-2.0.7.
To install package on cygwin you need to use its setup as downloaded by
https://cygwin.com
see
https://cygwin.com/cygwin-ug-net/setup-net.html#setup-packages
for how to select packages.
yum will not work and please note that Cygwin is not Linux. Most things works in the same way but not all.
I'm trying to install phpsh on Ubuntu and I did everything on the install guide, but I am getting this error:
Starting php
Traceback (most recent call last):
File "/usr/local/bin/phpsh", line 47, in <module>
verbose=opts.verbose)
File "/usr/local/lib/python2.7/dist-packages/phpsh/__init__.py",
line 503, in __init__
self.php_open_and_check()
File "/usr/local/lib/python2.7/dist-packages/phpsh/__init__.py",
line 641, in php_open_and_check
self.php_open()
File "/usr/local/lib/python2.7/dist-packages/phpsh/__init__.py",
line 698, in php_open
preexec_fn=os.setsid)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Why am I getting these errors? How do I install phpsh on linux?
Open ~/.bashrc from the terminal using:
linux#terminal:vi ~/.bashrc
set PYTHONPATH and path in there:
export PYTHONPATH=~/lib/python2.6/site-packages
//Put the above value as your site-packages directory location,
//yours may have a different python version number.
Then add ~/bin to your PATH as well as per your directory structure.
Walkthrough on installing phpsh on linux
The phpsh install guide at (http://www.phpsh.org/) site only gives you part of the details to get this up and running on linux.
The Gotchas:
phpsh won't run on your system if you don't have PHP configured properly.
phpsh won't run correctly if you don't have python configured properly.
If gcc is not properly setup, then phpsh will not install correctly.
You may need the python development headers for phpsh to work.
Here are all the specific steps I did to install phpsh on a Fedora 17 box
cd /home/el
sudo yum install php
sudo yum install php-posix
sudo yum install python
sudo yum install python-devel
git clone git://github.com/facebook/phpsh.git
cd /home/el/phpsh
sudo easy_install readline
python setup.py build
sudo python setup.py install
Open up your /home/el/.bashrc in an editor and add this line at the bottom:
export PYTHONPATH="/home/el/lib/python2.7/site-packages"
Make sure that the directory exists before you paste it in there. You may have to change the python2.7 to a different number to reflect your actual version. Restart the terminal.
Then, FINALLY, it runs as advertised:
el#defiant ~ $ phpsh
Starting php
php> echo "sweet lady freedom lets make out! " . 1337;
sweet lady freedom lets make out! 1337
php>
Then see my post to take a test drive of this tool: How to use the PHP interactive shell
Notes if you are adapting this to other flavors of Linux
You may have to use python-dev instead of python-devel.
I was also getting this issue last day as I am a new learner of PHP. At last I figured out problems.
You must need to install php5-cli from apt-get before installing phpsh.
Also keep in mind that required python packages should also be installed. For that go to https://github.com/facebookarchive/phpsh.
I assume you already have python and you are using Ubuntu 14.04 or above. While installing the python packages you may get some other errors, as it may require you to install easy-install etc. But don't worry, you will get very verbose errors that will tell you exactly what to do.
Hope this solves your problem.
Sooooooooooooooooo I had this problem too.
phpsh is checking for php on your system & not finding it.
$ sudo apt-get install php5
This is partially a matter of poor logging. See the lines in the Traceback:
File "/usr/local/lib/python2.7/dist-packages/phpsh/__init__.py",
line 641, in php_open_and_check
self.php_open()
The kicker was that I tried sudo apt-get install php which now obviously didn't work, but for some reason I didn't keep at it!