pyodbc and RODBC installation issues - python

I installed the unixODBC-devel packages via yum.
However, I get an error when I try to install RODBC / pyodbc
RODBC error
configure: error: "ODBC headers sql.h and sqlext.h not found"
pyodbc error
Command "/usr/bin/python -u -c "import setuptools,
tokenize;file='/tmp/pip-build-3ci8Au/pyodbc/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-m83SFn-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3ci8Au/pyodbc/
My system is RHEL Linux version 2.6.32-573.el6.x86_64. Installed the packages as root. What am I missing here?

You need to install unixODBC-devel, I believe, before you can install RODBC or pyodbc.
sudo yum install unixODBC-devel
Good luck!

Related

Error Installing flask-mysqldb

I am running Windows 10 and Python 3.6.3 . I am trying to install flask-mysqldb
using
pip install flask-mysqldb.
It fails with the following:
Command "c:\users...\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\..~1\AppData\Local\Temp\pip-install-5lp__7r6\mysqlclient\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users...~1\AppData\Local\Temp\pip-record-zvpyshav\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users...~1\AppData\Local\Temp\pip-install-5lp__7r6\mysqlclient\
I have tried to install the build tools for Visual Studio, but this doesn't seem to help.
Any help or direction would be appreciated.
Thank you.
On windows computers, mysql connector is a better alternative.
Install it using:
pip install mysql-connector
I hope that solves your problem.

pip install python-twitter Error

After making sure that pip is installed, I tried installing the twitter package using pip install python-twitter in the terminal but i get this error:
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/d1/49j6jy0d7hd_5cb6__cqwzhw0000gn/T/pip-build-5dzoDc/oauthlib/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/d1/49j6jy0d7hd_5cb6__cqwzhw0000gn/T/pip-GuXf_v-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/d1/49j6jy0d7hd_5cb6__cqwzhw0000gn/T/pip-build-5dzoDc/oauthlib/
It's worth noting I have Python 3.6 installed on a Mac, apart from the default 2.7.
The code also ends with this "error: could not create '/Library/Python/2.7/site-packages/oauthlib': Permission denied"

Error in installing Scrapy in Ubuntu Fresh Install

I am trying to install scrapy module in Ubuntu (running in Virtualbox on a Windows Machine).
When I do pip install scrapy, I get the following error at the end of the install:
Command /usr/bin/python -c "import setuptools, tokenise;
__file__='/tmp/pip-build-csKz7u/Twisted/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-FIY6qO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-csKz7u/Twisted
Storing debug log for failure in /root/.pip/pip.log
What am I missing or doing wrong here?
Ubuntu doesn't come with the python header and library by default it's in python-dev. Run the following to install before installing scrapy.
sudo apt-get update; sudo apt-get install python-dev -y

installing gcovr on ubuntu using pip

I am trying to intall gcovr on ubuntu using
pip install gcovr
but it gives this error
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_mymachine/gcovr/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uqjIdg-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_mymachin/gcovr
Storing debug log for failure in /home/mymachin/.pip/pip.log
Any ideas?
Thanks
I had no problems installing it this way:
sudo pip install gcovr
No errors.
If you're on Ubuntu 14.04, you may need to upgrade your pip.
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py

Cannot install pycrypto inside virtualenv on ubuntu 12.04

I tried pip install pycrypto using the virtualenv pip.
When I'm using sudo the installation succeeds, but not inside the virtual environment which does not help me.
The sudo apt-get install python-dev solution didn't help either. And also using easy_install and yum didn't help.
This is the bottom line of the error i get when I'm trying to install:
Command /home/ubuntu/conceep-env/bin/python -c "import setuptools,tokenize;__file__='/home/ubuntu/conceep-env/build/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/tmp/pip-NaKMgy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/conceep-env/include/site/python2.7 failed with error code 1 in /home/ubuntu/conceep-env/build/pycrypto
Storing debug log for failure in /var/tmp/tmp3k2sTZ
Just fixed it using sudo path/to/my/virtenv/bin/pip install pycrypto.

Categories