Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install cx_oracle from Ubuntu using pip install cx_oracle however I get the error below. Also tried to go to the pip package page and it does not look like there are any files associated to this package: https://pypi.python.org/pypi/cx_Oracle/5.1.2

Does this mean I have to install the package manually from http://cx-oracle.sourceforge.net/ with Alien ?

  Downloading/unpacking cx-Oracle
      Downloading cx_Oracle-5.1.2.tar.gz
    Exception:
    Traceback (most recent call last):
      File "/home/develop1/virtualEnv2/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
        status = self.run(options, args)
      File "/home/develop1/virtualEnv2/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
        requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "/home/develop1/virtualEnv2/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 985, in prepare_files
        self.unpack_url(url, location, self.is_download)
      File "/home/develop1/virtualEnv2/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1109, in unpack_url
        retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
      File "/home/develop1/virtualEnv2/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", line 456, in unpack_http_url
        unpack_file(temp_location, location, content_type, link)
      File "/home/develop1/virtualEnv2/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/util.py", line 494, in unpack_file
        untar_file(filename, location)
      File "/home/develop1/virtualEnv2/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/util.py", line 418, in untar_file
        tar = tarfile.open(filename, mode)
      File "/usr/lib/python2.7/tarfile.py", line 1678, in open
        return func(name, filemode, fileobj, **kwargs)
      File "/usr/lib/python2.7/tarfile.py", line 1729, in gzopen
        raise ReadError("not a gzip file")
    ReadError: not a gzip file
share|improve this question

migrated from stackoverflow.com Apr 12 '13 at 21:15

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 5 down vote accepted

It seems automatically downloaded file corrupted. That is why ReadError: not a zip file

To install cx_Oracle you also need instantclient from Oracle. If you want a easy way to install, i prepared a bundle some time ago python-cxoracle.

Just copy the files for your Ubuntu version and add instantclient to ld.so.conf

wget https://github.com/ozanturksever/python-cxoracle/archive/master.zip
unzip master.zip
cp -r python-cxoracle-master/12.04/* /
echo "/opt/instantclient_11_2" > /etc/ld.so.conf.d/oracleclient.conf
ldconfig
share|improve this answer
1  
Thank you, this helped me, I love you –  Haim Bender Dec 24 '13 at 14:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.