Error installing requests_kerberos==0.12.0 in Azure DataBricks - azure-databricks

I am trying to install requests_kerberos == 0.12.0 in Azure DataBricks, but trying to install it generates an error and does not install.
this is the cluster configuration where I am trying to install it: Databricks Runtime Version7.0 (includes Apache Spark 3.0.0, Scala 2.12)
also try installing the following,% sh sudo apt-get install gcc python-dev libkrb5-dev, but the installation never finishes.
This is the error installing in the databricks notebook
ERROR: Command errored out with exit status 1: /databricks/python3/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k1b9yec8/pykerberos/setup.py'"'"'; file='"'"'/tmp/pip-install-k1b9yec8/pykerberos/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-tfttk2g6/install-record.txt --single-version-externally-managed --compile --install-headers /databricks/python3/include/site/python3.7/pykerberos Check the logs for full command output.
I appreciate any help

Tested on: Databricks Runtime Version7.0 (includes Apache Spark 3.0.0, Scala 2.12)
To install requests_kerberos==0.12.0 in Azure DataBricks:
%sh
pip install requests-kerberos
If you run an apt-get command without the -y option, you need to answer to all prompts that you get from that command interactively in order for the execution of the command to continue.
If you are using without “-y”, this command will be keep on running until we accept to answer to all prompts.
%sh
sudo apt-get install gcc python-dev libkrb5-dev
If you are using with “-y” it will automatically say yes to all the prompts and complete installation.
%sh
sudo apt-get install -y gcc python-dev libkrb5-dev

Related

Error code (exit code 1) when installing netfilterqueue on macOS

When I try to install the module netfilterqueue for python via pip, I get the error:
"Command
"/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-u -c "import setuptools, tokenize;file='/private/tmp/pip-install-Ut3XcJ/netfilterqueue/setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record /private/tmp/pip-record-teUDXs/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-Ut3XcJ/netfilterqueue/"
I installed the module scapy without any problems, so I'm confused why netfilterqueue isn't installing. I'm currently using macOS High Sierra.
According to these issue on their Github page, it is not supported on macOS.
https://github.com/kti/python-netfilterqueue/issues/14:
libnetfilterqueue is a Linux-only feature, so you won't be able to
install python-netfilterqueue on Mac OS.
https://github.com/kti/python-netfilterqueue/issues/2:
Sorry, python-netfilterqueue will not work on Mac because nfqueue is Linux-only: http://www.netfilter.org/projects/libnetfilter_queue/index.html
error code 1 means operation not permitted, so it is a problem of authorization.
Try with sudo before the command:
sudo pip install python-netfilterqueue

Installing Pyinstaller

I am getting the below error while installing Pyinstaller. Pip is already installed and the command used at the Terminal is pip install pyinstaller.
error: could not create
'/Library/Python/2.7/site-packages/_dummy_thread': Permission denied
Command "/usr/bin/python -u -c "import setuptools,
tokenize;file='/private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-install-PIu2W0/future/setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record /private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-record-7rrphN/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-install-PIu2W0/future/
My Python installed version is 3.6 and pip version is 10.0.1; however its showing some python 2.7 text in the output, as below, when I check versions:
Apples-MacBook-Pro:~ solelthermtechnik$ pip --version
pip 10.0.1 from /Library/Python/2.7/site-packages/pip-10.0.1-py2.7.egg/pip (python 2.7)
Apples-MacBook-Pro:~ solelthermtechnik$ python --version
Python 3.6.2
Please help to understand and fix. I could not get any way out of the question in Can I use PyInstaller from Python 2.7 to compile an executable for a Python 3 script?
I figured it out by trying to run with sudo (as admin) and password and it worked. So Pyinstaller successfully installed :)screenshot

Pip install failure - Known Bug

As of this week my vagrant builds are no longer working because of a pip error which is happening whenever I build a new machine, my existing machines have a working copy of pip. I'm provisioning `vagrant machines with ubuntu/trusty64 and the first command is:
sudo apt-get install python-pip
However after running sudo pip install something fails with the error
ImportError:No module packaging.version.
command/usr/binpython -c "import setuptools, tokenize;__file__=`/tmp/pip_build_root/defusexml/setup.py'; exec(compil(getattr(tokenize, 'open')(__file__).read().replace('\r\n', '\n'), __file__, 'exec')) install --record /tmp/pip-wVb4Du-record/install-record.txt --single-version-externally-managed --compile failed with erro code 1 in /tmp/pip_build_root/defusedxml Storing debug log for failure in /home/vagrant/.pip/pip.log
I've spun up a new machine and installed pip it installs with no errors. This is a new problem I've been provisioning machines with the same file for the past 6 months. Is there a way to fix this, have they changed a dependency?
After doing more research it turns out this is a known bug https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1658844 that has recently been introduced.
The workaround is to install pip with easy_install via python-setuptools and pip will work.

Install dlib in python3 on mac

Getting the below as error:
Collecting dlib
Using cached dlib-19.1.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/x1/bsml9c1532x102zlxhqt_k380000gn/T/pip-build-_1n6svbf/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/x1/bsml9c1532x102zlxhqt_k380000gn/T/pip-0m_zvdwp-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake on OSX using `sudo brew install cmake`.
You can also specify its path with --cmake parameter.
----------------------------------------
Then sudo brew install cmake is not installing as well.
Any solutions to this.
Maybe you should use brew without sudo..
brew install cmake

Errors when pip install psycopg2 to virtualenv

I have created virtual environment
leo#kodar:/var/www/python$ mkvirtualenv -p /var/www/python/3.5.0/bin/python3 --no-site-packages env350_185
and trying to install psycopg2 to it.
pip3 install psycopg2
This gives me a big log with errors. Here is the resume string of output log:
Command /var/www/.virtualenvs/env350_185/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-xibdmand/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gtvfmn3f-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/.virtualenvs/env350_185/include/site/python3.5 failed with error code 1 in /tmp/pip-build-xibdmand/psycopg2
When I try to do the same with virtual environment created with system version of Python3
mkvirtualenv -p /usr/bin/python3 --no-site-packages env_sys
it gives success.
What could the problem be? Other packages like Django 1.8.5 can be installed correctly. I have also tested it with python 3.4.3 from custom folder and get the same error. Only system python3 (3.4.3) works.
Full pip error log is here: https://gist.github.com/leoKiddy/25beaa96c67b2cfa2263

Resources