Project ERROR: Unknown module(s) in QT: x11extras - linux

I'm trying to build the pyqtdeploy-sysroot containing Qt5 and PyQt5 for the current machine (x86_64 system).
I tried Qt5 versions 5.15.0, 5.15.1 or 5.15.2 on a Fedora 30 (tried 31 and 32 as well as Debian 10 and Ubuntu 18.04, too) system using pyqtdeploy 3.0, 3.1 and 3.1.1.
On all systems I've installed all build dependencies I can think of:
python python3 python3-pip libssl-dev zlib1g-dev pyqt5-dev libqt5x11extras5-dev libgles2-mesa-dev
I event tried installing *x11*-dev and *gl*-dev (-devel respectively) :)
I always run into the following problem:
Running 'sip-install --qmake /home/frans/_HOME/2011_pyqt/docker_home/demo/sysroot-linux-64/Qt/bin/qmake --no-distinfo --concatenate 2 --no-docstrings --verbose'.
Querying qmake about your Qt installation...
/home/frans/_HOME/2011_pyqt/docker_home/demo/sysroot-linux-64/Qt/bin/qmake -query
This is the GPL version of PyQt 5.15.0 (licensed under the GNU General Public License) for Python 3.7.7 on linux.
Found the license file 'pyqt-gpl.sip'.
These bindings will be built: QtCore, QtNetwork, QtGui, QtWidgets, QtX11Extras.
Generating the QtCore bindings...
Generating the QtNetwork bindings...
Generating the QtGui bindings...
Generating the QtWidgets bindings...
Generating the QtX11Extras bindings...
Generating the .pro file for the QtCore module...
Generating the .pro file for the QtNetwork module...
Generating the .pro file for the QtGui module...
Generating the .pro file for the QtWidgets module...
Generating the .pro file for the QtX11Extras module...
Generating the top-level .pro file...
Generating the Makefiles...
/home/frans/_HOME/2011_pyqt/docker_home/demo/sysroot-linux-64/Qt/bin/qmake -recursive PyQt5.pro
sip-install: '/home/frans/_HOME/2011_pyqt/docker_home/demo/sysroot-linux-64/Qt/bin/qmake -recursive PyQt5.pro' failed returning 3
Info: creating stash file /tmp/tmp1_ng3eyh/.qmake.stash
Reading /tmp/tmp1_ng3eyh/QtCore/QtCore.pro
Reading /tmp/tmp1_ng3eyh/QtNetwork/QtNetwork.pro
Reading /tmp/tmp1_ng3eyh/QtGui/QtGui.pro
Reading /tmp/tmp1_ng3eyh/QtWidgets/QtWidgets.pro
Reading /tmp/tmp1_ng3eyh/QtX11Extras/QtX11Extras.pro
Project ERROR: Unknown module(s) in QT: x11extras
pyqtdeploy-sysroot: execution of 'sip-install' failed: returned exit code 1
I'm trying basically the same thing as this guy: https://www.riverbankcomputing.com/pipermail/pyqt/2020-September/043203.html - but it seems like he had given up and switched to iOS..
Any idea what I can do to investigate this behavior? I didn't modify anything regarding pyqtdeploy, Qt5, or the demo, all I'm doing is
pip3 install pyqtdeploy sip PyQt-builder
wget https://files.pythonhosted.org/packages/ab/8c/1416eaed51c87a5ac934ee982e5c6e0a9dcab8d9b0b0461d4b8b259db5f6/pyqtdeploy-3.1.0.tar.gz
tar xf pyqtdeploy-3.1.0.tar.gz
cd pyqtdeploy-3.1.0/demo
python3 build-demo.py --verbose

You obviously left some steps out here because in clean installs of Ubutu 18.04 LTS and 20.04 LTS I can't get far enough into what you did for it to actually attempt to build Qt.
Here is what I can tell you. In a clean Ubuntu 18.04 LTS VM I run this and can build either CopperSpice (a Qt 4.8 fork) or Qt code.
#
sudo apt-get install libfreetype6-dev libfontconfig1-dev libglib2.0-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libice-dev \
libaudio-dev libgl1-mesa-dev libc6-dev libsm-dev libxcursor-dev \
libxext-dev libxfixes-dev libxi-dev libxinerama-dev \
libxrandr-dev libxrender-dev libxkbcommon-dev \
libxkbcommon-x11-dev libx11-dev
sudo apt-get install libxcb1-dev libx11-xcb-dev libxcb-glx0-dev \
libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \
libxcb-render0-dev libxcb-render-util0-dev \
libxcb-randr0-dev libxcb-shape0-dev libxcb-shm0-dev \
libxcb-sync-dev libxcb-xfixes0-dev \
libxcb-xinerama0-dev libxcb-xkb-dev
sudo apt-get install g++ gperf ninja-build cmake
sudo apt-get install libpulse-dev libasound2-dev libssl-dev libcups2-dev \
libxml++2.6-dev postgresql-server-dev-10
sudo apt-get install git
# extra for diamond
sudo apt-get install hunspell libhunspell-dev astyle
In a clean Ubuntu 20.04 LTS VM I run this script and can do the same.
#
sudo apt-get install libfreetype6-dev libfontconfig1-dev libglib2.0-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libice-dev \
libaudio-dev libgl1-mesa-dev libc6-dev libsm-dev libxcursor-dev \
libxext-dev libxfixes-dev libxi-dev libxinerama-dev \
libxrandr-dev libxrender-dev libxkbcommon-dev \
libxkbcommon-x11-dev libx11-dev
sudo apt-get install libxcb1-dev libx11-xcb-dev libxcb-glx0-dev \
libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \
libxcb-render0-dev libxcb-render-util0-dev \
libxcb-randr0-dev libxcb-shape0-dev libxcb-shm0-dev \
libxcb-sync-dev libxcb-xfixes0-dev \
libxcb-xinerama0-dev libxcb-xkb-dev
sudo apt-get install g++ gperf ninja-build cmake
sudo apt-get install libpulse-dev libasound2-dev libssl-dev libcups2-dev \
libxml++2.6-dev postgresql-server-dev-12
sudo apt-get install git
# extra for diamond
sudo apt-get install hunspell libhunspell-dev astyle
So, what I suggest is that you pick one of your VMs, open a terminal,
sudo apt-get update
sudo apt-get upgrade
then run the appropriate script. I suspect you are falling over because of the XCB stuff. It shouldn't take you long to run one of those scripts in the appropriate VM to try this.

Related

Unable to locate Python.h despite having it in the system (Ubuntu 16)

I have Anaconda 3.6 and I'm trying to compile Pycaffe (from Caffe framework) but I get the following error:
python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
I have installed the python-dev packages specific to Python 3.6 with sudo apt-get install python3.6-dev and when I run locate Python.h it returns:
/home/jdevezas/.local/share/Trash/info/Python.h.trashinfo
/home/jdevezas/anaconda/bin/Python.h
/home/jdevezas/anaconda/include/python3.6m/Python.h
/home/jdevezas/anaconda/pkgs/python-3.6.0-0/include/python3.6m/Python.h
/home/jdevezas/anaconda/pkgs/python-3.6.4-hc3d631a_1/include/python3.6m/Python.h
/usr/include/python2.7/Python.h
/usr/include/python3.5m/Python.h
/usr/lib/llvm-3.5/include/lldb/Interpreter/ScriptInterpreterPython.h
The correct PATH to the Anaconda folder is specified in my .bashrc file with:
export PATH="home/jdevezas/anaconda/bin:$PATH"
Any ideas?
I am not sure if you faced the same problem but in my case.
After installing the python-dev packages via -
sudo apt-get install python3-dev
sudo apt-get install python3.5-dev
sudo apt-get install python3.6-dev
I had python3.6 installed but the defaults were pointing to python3.5.
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
# $(ANACONDA_HOME)/include/python2.7 \
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
# Uncomment to use Python 3 (default is Python 2)
PYTHON_LIBRARIES := boost_python3 python3.5m
PYTHON_INCLUDE := /usr/include/python3.5m \
Can you confirm?

flask-mysqldb support for Python 3.6? [duplicate]

I am trying to get a Python script to run on the linux server I'm connected to via ssh. The script uses mysqldb. I have all the other components I need, but when I try to install mySQLdb via setuptools like so:,
python setup.py install
I get the following error report related to the mysql_config command.
sh: mysql_config: command not found
Traceback (most recent call last):
File "setup.py", line 15, in <module>
metadata, options = get_config()
File "/usr/lib/python2.5/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/usr/lib/python2.5/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Has anyone else encountered this error and if so how did you resolve it/what can I do to successfully install mysqldb?
mySQLdb is a python interface for mysql, but it is not mysql itself. And apparently mySQLdb needs the command 'mysql_config', so you need to install that first.
Can you confirm that you did or did not install mysql itself, by running "mysql" from the shell? That should give you a response other than "mysql: command not found".
Which linux distribution are you using? Mysql is pre-packaged for most linux distributions. For example, for debian / ubuntu, installing mysql is as easy as
sudo apt-get install mysql-server
mysql-config is in a different package, which can be installed from (again, assuming debian / ubuntu):
sudo apt-get install libmysqlclient-dev
if you are using mariadb, the drop in replacement for mysql, then run
sudo apt-get install libmariadbclient-dev
Reference:
https://github.com/JudgeGirl/Judge-sender/issues/4#issuecomment-186542797
I was installing python-mysql on Ubuntu 12.04 using
pip install mysql-python
First I had the same problem:
Not Found "mysql_config"
This worked for me
$ sudo apt-get install libmysqlclient-dev
Then I had this problem:
...
_mysql.c:29:20: error fatal: Python.h: No existe el archivo o el directorio
compilación terminada.
error: command 'gcc' failed with exit status 1
Then I tried with
apt-get install python-dev
(If you're using python3, install python3-dev instead.)
And then I was happy :)
pip install mysql-python
Installing collected packages: mysql-python
Running setup.py install for mysql-python
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,4,'beta',4) -D__version__=1.2.4b4 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -g
In file included from _mysql.c:44:0:
/usr/include/mysql/my_config.h:422:0: aviso: se redefinió "HAVE_WCSCOLL" [activado por defecto]
/usr/include/python2.7/pyconfig.h:890:0: nota: esta es la ubicación de la definición previa
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r -lpthread -lz -lm -lrt -ldl -o build/lib.linux-x86_64-2.7/_mysql.so
Successfully installed mysql-python
Cleaning up...
(Specific to Mac OS X)
I have tried a lot of things, but these set of commands finally worked for me.
Install mysql
brew install mysql
brew unlink mysql
brew install mysql-connector-c
Add the mysql bin folder to PATH
export PATH=/usr/local/Cellar/mysql/8.0.11/bin:$PATH
mkdir /usr/local/Cellar/lib/
Create a symlink
sudo ln -s /usr/local/Cellar/mysql/8.0.11/lib/libmysqlclient.21.dylib /usr/local/Cellar/lib/libmysqlclient.21.dylib
brew reinstall openssl (source)
Finally, install mysql-client
LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ pip install mysqlclient
Update:
In case this doesn't work, #vinyll suggests to run brew link mysql before step 8.
On Red Hat I had to do
sudo yum install mysql-devel gcc gcc-devel python-devel
sudo easy_install mysql-python
Then it worked.
On python 3.5.2 + any future version
sudo apt-get install libmysqlclient-dev python-dev
The below worked for me on Ubuntu 12.04 LTS:
apt-get install libmysqlclient-dev python-dev
All though it worked, i still went ahead to do the below:
export PATH=$PATH:/usr/local/mysql/bin/
I got the same error while trying to install mysql-python.
This is how I fixed it.
sudo PATH=/usr/local/mysql/bin/:$PATH pip install mysql-python
The problem was that the installer could not find the mysql_config in the default path. Now it can ..and it worked..
15 warnings generated.
clang -bundle -undefined dynamic_lookup -Wl,-F. build/temp.macosx-10.8-intel-2.7/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.8-intel-2.7/_mysql.so -arch x86_64
Successfully installed mysql-python
Cleaning up...
Hope this helps.
Thanks.
I fixed this problem with the following steps:
sudo apt-get install libmysqlclient-dev
sudo apt-get install python-dev
sudo python setup.py install
The commands (mysql too) mPATH might be missing.
export PATH=$PATH:/usr/local/mysql/bin/
Step1:-Install Python3 & Python3-dev Both
sudo apt-get install python3 python3-dev
Step2:- Install Python & Mysql Connector
sudo apt-get install libmysqlclient-dev
step3:- Install python mysql client
sudo apt-get install mysqlclient
This will Solve your Problem
The package libmysqlclient-dev is deprecated, so use the below command to fix it.
Package libmysqlclient-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
sudo apt-get install default-libmysqlclient-dev
I think the most convenient way to solve this problem in 2020 is using another python package. We don't need install any other binary software.
Try this
pip install mysql-connector-python
and then
import mysql.connector
mydb = mysql.connector.connect(
host="",
user="",
passwd="",
database=""
)
cursor = mydb.cursor( buffered=True)
cursor.execute('show tables;')
cursor.execute('insert into test values (null, "a",10)')
mydb.commit()
mydb.disconnect()
If you're on macOS and already installed mysql#5.7 via brew install:
brew install mysql-connector-c
brew unlink mysql#5.7
brew link --overwrite --dry-run mysql#5.7 first, to see what symlinks are getting overwritten
brew link --overwrite --force mysql#5.7 to actually overwrite mysql-related symlinks with mysql#5.7
pip install mysqlclient
I fixed it by installing libmysqlclient:
sudo apt-get install libmysqlclient16-dev
In centos 7 this works for me :
yum install mariadb-devel
pip install mysqlclient
The MySQL-python package is using the mysql_config command to learn about the mysql configuration on your host. Your host does not have the mysql_config command.
The MySQL development libraries package (MySQL-devel-xxx) from dev.mysql.com provides this command and the libraries needed by the MySQL-python package. The MySQL-devel packages are found in the download - community server area. The MySQL development library package names start with MySQL-devel and vary based MySQL version and linux platform (e.g. MySQL-devel-5.5.24-1.linux2.6.x86_64.rpm.)
Note that you do not need to install mysql server.
For Alpine Linux:
$ apk add mariadb-dev mariadb-client mariadb-libs
MariaDB is a drop-in replacement for MySQL and became the new standard as of Alpine 3.2. See https://bugs.alpinelinux.org/issues/4264
On my Fedora 23 machine I had to run the following:
sudo dnf install mysql-devel
In CentOS 7 , the following things should be done:
#step1:install mysql
https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
#step2:
sudo yum install mysql-devel
or
sudo yum install mysql-community-devel
I think, following lines can be executed on terminal
sudo ln -s /usr/local/zend/mysql/bin/mysql_config /usr/sbin/
This mysql_config directory is for zend server on MacOSx. You can do it for linux like following lines
sudo ln -s /usr/local/mysql/bin/mysql_config /usr/sbin/
This is default linux mysql directory.
I had this issues and solved if by adding a symlink to mysql_config.
I had installed mysql with homebrew and saw this in the output.
Error: The `brew link` step did not complete successfully
Depending on how you got mysql it will be in different places. In my case /usr/local/Cellar/mysql
Once you know where it is you should be able to ma a symbolic link to where python is looking for it. /usr/local/mysql
This worked for me.
ln -s /usr/local/Cellar/mysql/<< VERSION >>/bin/mysql_config /usr/local/mysql/bin/mysql_config
I had the same problem. I solved it by following this tutorial to install Python with python3-dev on Ubuntu 16.04:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y python3-pip
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
And now you can set up your virtual environment:
sudo apt-get install -y python3-venv
pyvenv my_env
source my_env/bin/activate
also, i fetch the same problem
I fixed this problem with the following steps:
First I run this command
sudo apt-get install libmysqlclient-dev
then I install
pip install mysqlclient==2.1.0
this is worked for me
You need to install the python-dev package:
sudo apt-get install python-dev
sudo apt-get install python-mysqldb
Python 2.5? Sounds like you are using a very old version of Ubuntu Server (Hardy 8.04?) - please confirm which Linux version the server uses.
python-mysql search on ubuntu package database
Some additional info:
From the README of mysql-python -
Red Hat Linux
.............
MySQL-python is pre-packaged in Red Hat Linux 7.x and newer. This
includes Fedora Core and Red Hat Enterprise Linux. You can also
build your own RPM packages as described above.
Debian GNU/Linux
................
Packaged as python-mysqldb_::
# apt-get install python-mysqldb
Or use Synaptic.
.. _python-mysqldb: http://packages.debian.org/python-mysqldb
Ubuntu
......
Same as with Debian.
Footnote: If you really are using a server distribution older than Ubuntu 10.04 then you are out of official support, and should upgrade sooner rather than later.
This method is only for those who know that Mysql is installed but still mysql_config can't be find. This happens if python install can't find mysql_config in your system path, which mostly happens if you have done the installation via .dmg Mac Package or installed at some custom path. The easiest and documented way by MySqlDB is to change the site.cfg. Find the mysql_config which is probably in /usr/local/mysql/bin/ and change the variable namely mysql_config just like below and run the installation again. Don't forget to un-comment it by removing "#"
Change below line
"#mysql_config = /usr/local/bin/mysql_config"
to
"mysql_config = /usr/local/mysql/bin/mysql_config"
depending upon the path in your system.
By the way I used python install after changing the site.cfg
sudo /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install
So far, all solutions (Linux) require sudo or root rights to install .
Here is a solution if you do not have root rights and without sudo. (no sudo apt install ...):
Download the .deb file of the libmysqlclient-dev, e.g. from this mirror
Navigate to the downloaded file and run dpkg -x libmysqlclient-dev_<version tag>.deb . This will extract a folder called usr.
Symlink ./usr/bin/mysql_config to somewhere that is found on your $PATH:
ln -s `pwd` /usr/bin/mysql_config FOLDER_IN_YOUR_PATH
It should now be able to find mysql_config
Tested on Ubuntu 18.04.
For macOS Mojave , additional configuration was required, for compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
I encountered the same problem, just added the path where *mysql_config* resided to the environment variable PATH and it worked for me.
sudo apt-get build-dep python-mysqldb will install all the dependencies to build the package from PIP/easy_install

How to enable multithreading with Caffe?

I would like to compile / configure Caffe so that when I trained an artificial neural network with it, the training is multi-threaded (CPU only, no GPU). How to enable multithreading with Caffe? I use Caffe on Ubuntu 14.04 LTS x64.
One way is to use OpenBLAS instead of the default ATLAS. To do so,
sudo apt-get install -y libopenblas-dev
Before compiling Caffe, edit Makefile.config, replace BLAS := atlas by BLAS := open
After compiling Caffe, running export OPENBLAS_NUM_THREADS=4 will cause Caffe to use 4 cores.
If interested, here is a script to install Caffe and pycaffe on a new Ubuntu 14.04 LTS x64 or Ubuntu 14.10 x64. CPU only, multi-threaded Caffe. It can probably be improved, but it's good enough for me for now:
# This script installs Caffe and pycaffe on Ubuntu 14.04 x64 or 14.10 x64. CPU only, multi-threaded Caffe.
# Usage:
# 0. Set up here how many cores you want to use during the installation:
# By default Caffe will use all these cores.
NUMBER_OF_CORES=4
# 1. Execute this script, e.g. "bash compile_caffe_ubuntu_14.04.sh" (~30 to 60 minutes on a new Ubuntu).
# 2. Open a new shell (or run "source ~/.bash_profile"). You're done. You can try
# running "import caffe" from the Python interpreter to test.
#http://caffe.berkeleyvision.org/install_apt.html : (general install info: http://caffe.berkeleyvision.org/installation.html)
cd
sudo apt-get update
#sudo apt-get upgrade -y # If you are OK getting prompted
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -q -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" # If you are OK with all defaults
sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev
sudo apt-get install -y --no-install-recommends libboost-all-dev
sudo apt-get install -y libatlas-base-dev
sudo apt-get install -y python-dev
sudo apt-get install -y python-pip git
# For Ubuntu 14.04
sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
# LMDB
# https://github.com/BVLC/caffe/issues/2729: Temporarily broken link to the LMDB repository #2729
#git clone https://gitorious.org/mdb/mdb.git
#cd mdb/libraries/liblmdb
#make && make install
git clone https://github.com/LMDB/lmdb.git
cd lmdb/libraries/liblmdb
sudo make
sudo make install
# More pre-requisites
sudo apt-get install -y cmake unzip doxygen
sudo apt-get install -y protobuf-compiler
sudo apt-get install -y libffi-dev python-dev build-essential
sudo pip install lmdb
sudo pip install numpy
sudo apt-get install -y python-numpy
sudo apt-get install -y gfortran # required by scipy
sudo pip install scipy # required by scikit-image
sudo apt-get install -y python-scipy # in case pip failed
sudo apt-get install -y python-nose
sudo pip install scikit-image # to fix https://github.com/BVLC/caffe/issues/50
# Get caffe (http://caffe.berkeleyvision.org/installation.html#compilation)
cd
mkdir caffe
cd caffe
wget https://github.com/BVLC/caffe/archive/master.zip
unzip -o master.zip
cd caffe-master
# Prepare Python binding (pycaffe)
cd python
for req in $(cat requirements.txt); do sudo pip install $req; done
echo "export PYTHONPATH=$(pwd):$PYTHONPATH " >> ~/.bash_profile # to be able to call "import caffe" from Python after reboot
source ~/.bash_profile # Update shell
cd ..
# Compile caffe and pycaffe
cp Makefile.config.example Makefile.config
sed -i '8s/.*/CPU_ONLY := 1/' Makefile.config # Line 8: CPU only
sudo apt-get install -y libopenblas-dev
sed -i '33s/.*/BLAS := open/' Makefile.config # Line 33: to use OpenBLAS
# Note that if one day the Makefile.config changes and these line numbers change, we're screwed
# Maybe it would be best to simply append those changes at the end of Makefile.config
echo "export OPENBLAS_NUM_THREADS=($NUMBER_OF_CORES)" >> ~/.bash_profile
mkdir build
cd build
cmake ..
cd ..
make all -j$NUMBER_OF_CORES # 4 is the number of parallel threads for compilation: typically equal to number of physical cores
make pycaffe -j$NUMBER_OF_CORES
make test
make runtest
#make matcaffe
make distribute
# Bonus for other work with pycaffe
sudo pip install pydot
sudo apt-get install -y graphviz
sudo pip install scikit-learn
# At the end, you need to run "source ~/.bash_profile" manually or start a new shell to be able to do 'python import caffe',
# because one cannot source in a bash script. (http://stackoverflow.com/questions/16011245/source-files-in-a-bash-script)
I have placed this script on GitHub: https://github.com/Franck-Dernoncourt/caffe_demos/tree/master/caffe_installation .
This is to just extend Franck's answer where he used sed to modify the config file. If you are having problems with that, here is another way to get the same thing done.
The difference is that instead of changing the config file you directly change the camke flag cmake -DCPU_ONLY=1 -DBLAS=open ..
$sudo apt update && sudo apt-get install -y libopenblas-dev
$git clone -b 1.0 --depth 1 https://github.com/BVLC/caffe.git . && \
pip install --upgrade pip && \
cd python && pip install -r requirements.txt && cd .. && \
mkdir build && cd build && \
cmake -DCPU_ONLY=1 -DBLAS=open .. && \
make -j"$(nproc)"
While building caffe, you have to add the -fopenmp to the CXXFLAGS and LINKFLAGS to support OPENMP. If you have a flag named OPENMP in the Makefil.config, you can simply set that to 1. You can use either OPENBLAS or Intel MKL BLAS library. While building the OPENBLAS you need to set USE_OPENMP=1 flag so that it supports OPENMP. After building caffe, please export the number of threads you want to use during runtime by setting up OMP_NUM_THREADS=n where n is the number of threads you want. Here is a good discussion related to multi-threading in Caffe: https://github.com/BVLC/caffe/pull/439

unable to lacate package hue

I'm trying to install Hue on Ubuntu 14, it displays this :
apt-get install hue
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package hue
anyone have an idea.
thanks
This installation script worked for me.
sudo apt-get install git
git clone https://github.com/cloudera/hue.git
cd hue
apt-get install python2.7-dev \
make \
libkrb5-dev \
libxml2-dev \
libxslt-dev \
libsqlite3-dev \
libssl-dev \
libldap2-dev \
python-pip
sudo apt-get install maven
sudo ln -s /usr/lib/python2.7/plat-*/_sysconfigdata_nd.py /usr/lib/python2.7/
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java7-set-default
make apps
If you are behind a proxy server, make sure you set your environment variables correctly when installing oracle-java7 or any other package outside the repository.
Seems the repository doesn`t contain such package.
Try build binaries from sources: guide
You could try to use the Lucid 12.04 packages: http://archive.cloudera.com/cdh5/one-click-install/precise/amd64/
The Trusty 14.04 are coming up in less than a month in CDH5.2.

How to install python3.4 in home 'not root'? ensurepip failure

I do not have root privileges on the Red Hat Linux machine I am installing python3.4 on.
Downloaded Python-3.4.1.tgz
tar -xzf Python-3.4.1.tgz
./configure
makealtinstall --with-ensurepip=install prefix=~ exec-prefix=~
Python3 does install, but I don't have pip.
I get the following error:
Ignoring ensurepip failure: pip 1.5.6 requires SSL/TLS
I don't have root access so I cannot install via:
sudo apt-get install libssl-dev openssl
I do have a working version of openssl.
Does anyone have suggestions I could try?
Since you are in RedHat, you have to install openssl-devel
yum install openssl-devel
Or you can install it later with get-pip.py
The complete procedure for installing Python 3.4 with pip3/pip3.4 on RHEL7 is below. For Ubuntu 12.04 LTS replace yum with apt-get, openssl-devel with libssl-dev and you are good to go:
sudo yum install -y gcc make openssl-devel openssl
wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
tar -xf Python-3.4.3.tgz
cd Python-3.4.3/
./configure --with-ensurepip=install
make
make install
Alternatively, you can run make altinstall depending on whether you need create python link or not.

Resources