I am trying to build the Yocto linux image. I am following the process given in Sergey's Blog. Unzip the file:
$ 7z x Board_Support_Package_Sources_for_Intel_Quark_v0.7.5.7z
Unzip meta-clanton_v0.7.5.tar.gz:
$ tar xzvf Board_Support_Package_Sources_for_Intel_Quark_v0.7.5/meta-clanton_v0.7.5.tar.gz
Change directory to meta-clanton_v0.7.5:
$ cd meta-clanton_v0.7.5
Run setup.sh:
$ ./setup.sh
Source poky/oe-init-build-env script, giving it the build directory (yocto_build) as a parameter:
$ source poky/oe-init-build-env yocto_build
Run bitbake to build the image:
$ bitbake image-full
But I am getting the following error:
Traceback (most recent call last):
File "/usr/bin/bitbake", line 275, in <module>
ret = main()
File "/usr/bin/bitbake", line 222, in main
bb.msg.init_msgconfig(configuration.verbose, configuration.debug,
AttributeError: 'module' object has no attribute 'init_msgconfig'
Please help.
Thanks in advance.
I couldn't find the 0.7.5 version, so I've tried this on the 1.0.0 version.
Extracting meta-clanton-v1.0.0.tar.gz
cd meta-clanton_v1.0.0
./setup.sh
. poky/oe-init-build-env yocto_build
bitbake image-full -e
Running bitbake image-full does also start the build without any issue. (I haven't let it complete though.)
I'm slightly worried about your traceback, which includes "/usr/bin/bitbake". If you have installed a bitbake package on your build-machine, please uninstall it. The poky-git repo does include it's own copy of bitbake, which will ensure that you're the version of bitbake you're using is compatible with the rest of your meta-data.
(I'd also suggest updating to the latest meta-clanton release).
Related
When I am using repo init to initialize some repo from a source, I keep getting:
Traceback (most recent call last):
File "/home/workspace/.repo/repo/main.py", line 56, in <module>
from subcmds.version import Version
File "/home/workspace/.repo/repo/subcmds/__init__.py", line 38, in <module>
['%s' % name])
File "/home/workspace/.repo/repo/subcmds/upload.py", line 27, in <module>
from hooks import RepoHook
File "/home/workspace/.repo/repo/hooks.py", line 472
file=sys.stderr)
^
SyntaxError: invalid syntax
The following are the python versions I have:
python -V -> 2.7
python3 -V -> 3.6
According to this link, python 3.6 is required starting with repo-1.14 but I'm not certain if that's what my repo version is - didn't have any luck finding a way around determining the version.
Looks like you are running an old repo launcher script version that is incompatible with the latest repo version. To fix this, download the latest repo launcher python script from Google and replace your outdated one.
The launcher script is the executable python script called "repo" and is located in your PATH, usually ~/bin (according to Google's instructions) or ~/.local/bin/. To find out where yours is located, type which repo in the terminal and it will print the script's location.
Let's say your repo script is in ~/bin. To download the script (and make it executable), you can do:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Also, you do not need to remove Python 2.7 for repo to work. I use Ubuntu 18.04 and have both Python 2.7 and 3.6 installed as well, and repo runs fine.
Not sure whether I should be posting this on askubuntu or here.
I am trying to perform object detection using Tensorflow. I am therefor following this tutorial (this link shows the exact issue I am facing).
When running this script, I get this error:
$ python3 train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
Traceback (most recent call last):
File "train.py", line 51, in <module>
from object_detection import trainer
File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/trainer.py", line 33, in <module>
from deployment import model_deploy
ImportError: No module named 'deployment
According to the info I found online and the video I linked above I have to execute this command:
export PYTHONPATH=$PYTHONPATH:`pwd`/slim
While being in the tensorflow/model/ directory. Yet, it doesn't solve my issue. And I don't really know what I should check in order to find out what is causing this persistent issue.
Could someone help me out?
Thanks
EDIT:
exactly what I do:
(tensorflow) xxx#yyy-ThinkPad-X200:~/Downloads/models/research/build/lib/object_detection$ cd ../../../../
(tensorflow) xxx#yyy-ThinkPad-X200:~/Downloads/models$ export PYTHONPATH=$PYTHONPATH:`pwd`/slim
(tensorflow) xxx#yyy-ThinkPad-X200:~/Downloads/models$ cd ~/Downloads/models/research/build/lib/object_detection
(tensorflow) xxx#yyy-ThinkPad-X200:~/Downloads/models/research/build/lib/object_detection$ python3 train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
Traceback (most recent call last):
File "train.py", line 51, in <module>
from object_detection import trainer
File "/usr/local/lib/python3.5/dist-packages/object_detection-0.1-py3.5.egg/object_detection/trainer.py", line 33, in <module>
from deployment import model_deploy
ImportError: No module named 'deployment'
(tensorflow) xxx#yyy-ThinkPad-X200:~/Downloads/models/research/build/lib/object_detection$
If you are installing from a clone of the tensorflow/models github you need to be inside models/research folder when you run the command:
$ export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
Notice the extra `pwd` to your command.
I still had problems until I ran from within models/research:
$ python setup.py build
$ python setup.py install
$ python slim/setup.py build
$ python slim/setup.py install
Note: In your case you may need to run python3 instead of python.
This work for me:
Copy relevant deployment folder from the \models\slim directory
paste it to Python\Lib\site-packages directory
then run again.It will work!
It's PYTHONPATH not PYTHONPAT. You're missing H in your export statement.
As of now, the slim folder has been moved to models/research. So if models is in the /home directory, do the following to resolve the issue:
1- Open the ~/.bashrc and add the following line to the end of the file:
export PYTHONPATH="$PYTHONPATH:/home/models:/home/models/research/slim/"
3- Close the file and do source ~/.bashrc
I'm trying to install Plumi 4.5.1 which is based on Plone.
Target system is a:
3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64
(Debian GNU/Linux 8)
I'm following this guide
https://mgogoulos.trinket.io/plumi-4-5#/installation/installation
and after doing all prior steps successfully, when i try to run the buildout in Step 4 as following:
./bin/python bootstrap.py && ./bin/buildout -v
I get this error:
root#suhail:/home/plumi/PLUMI/plumi.app# ./bin/python bootstrap.py && ./bin/buildout -v
Traceback (most recent call last):
File "bootstrap.py", line 61, in <module>
).read() in ez
File "<string>", line 1
<!DOCTYPE html>
^
SyntaxError: invalid syntax
Is there anybody which can give me a hint ?
Looks like the bootstrap.py is read as an HTML file (!?).
I already tried deleting and re-cloning the repository.
The Plumi bootstrap script tries to install setuptools from an outdated URL:
exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py'
).read() in ez
The domain name python-distribute.org now redirects to a link farm.
The Plumi project should fix their bootstrap script ASAP, but you can fix this locally by replacing the URL with https://bitbucket.org/pypa/setuptools/raw/f657df1f1ed46596d236376649c99a470662b4ba/distribute_setup.py as a temporary workaround. This is the URL that the official buildout 1.x bootstrap.py now uses.
The domain name is gone because the distribute is long dead; it was a fork of setuptools that merged back into the main project.
I'm trying to install pyev on Ubuntu using pip but I get this error. libev.so.4 does indeed exist, I found it at /usr/local/lib along with other libev.so files so I assume it's simply a matter of python isn't looking in the right spot or the .so's got put in the wrong place by mistake.
$ pip install pyev
Collecting pyev
Using cached pyev-0.9.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-cBE9pk/pyev/setup.py", line 57, in <module>
check_version(libev_version(), min_libev_version, "libev")
File "/tmp/pip-build-cBE9pk/pyev/setup.py", line 48, in libev_version
libev_dll = cdll.LoadLibrary(libev_dll_name)
File "/usr/local/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/usr/local/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libev.so.4: cannot open shared object file: No such file or directory
So my question is where the libev.so files should live, or, if they're in the correct place, why can't python find them and how do I fix it?
EDIT: Python version 2.7.10, Pip version 7.1.0 both downloaded and installed today (Python manually, pip using get-pip.py)
locate libev gives me a long list of files for libevent, libevolution, and libevview. Pretty much the only thing related to libev was usr/lib/libevdocument.so.1, usr/lib/libevdocument.so.1.0.0, and /usr/share/doc/libevdocument1 (which included AUTHORS, NEWS.gz, README, TODO, changelog.Debian.gz, and copyright). Nothing in local for some reason
EDIT 2.0
Running it as sudo (can't believe I forgot that) gives me a weird error message "The directory /home/username/.cache/pip/http or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag." and then proceeded to redownload pyev-0.9.0.tar.gz and run into the same error of not finding libev.so.4.
Running it as 'sudo -H pip install pyev' gave me the first error message again (using the cached pyev). What does sudo -H do anyway? I couldn't find anything about it online or in the sudo help message.
Looking at another partition that has libev properly installed I was able to find the libev.so files under usr/lib rather than usr/local/lib. Copying them to that folder and running sudo -H pip install pyev seems to have properly installed pyev. Thanks for your help.
I'm running Debian 6.0.6
I've downloaded latest version of libtorrent-rasterbar from here: http://code.google.com/p/libtorrent/downloads/detail?name=libtorrent-rasterbar-0.16.6.tar.gz&can=2 and installed it:
./configure --enable-python-binding
make
make install
cd bindings/python
python setup.py build
python setup.py install
now I want to test whether the library works:
>>> import libtorrent
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libtorrent-rasterbar.so.7: cannot open shared object file: No such file or directory
The packaged version of libtorrent from the distributive's repository had some funny behaviour (complaining on boost dependences), so I've decided to upgrade. The same situation is on both of my debian boxes, yet ubuntu box is fine.
old error message from my debian box:
File "ar.py", line 15, in create
s.start_dht()
Boost.Python.ArgumentError: Python argument types in
session.start_dht(session)
did not match C++ signature:
start_dht(libtorrent::session {lvalue}, libtorrent::entry)
Search for the shared object file and add it to your path.
sudo updatedb
locate libtorrent-rasterbar.so.7
This should output /<path_to_directory>/libtorrent-rasterbar.so.7
Add this to your ~/.profile or temporarily tell Python where to look:
export LD_LIBRARY_PATH=/<path_to_directory>/
See more detailed installation instructions here.