How to Install cx_oracle in Python on Linux?
Last Updated :
30 Sep, 2021
The cx_oracle package is used to connect with the Oracle database using python. In this, article, we will look into the process of installing the cx_oracle package on Linux.
Pre-requisites:
The only thing that you need for installing Numpy on Windows are:
Installing cx_oracle Package on Linux using Conda:
If you want the installation to be done through conda, you can use the below command:
conda install cx_oracle
Type in "y" for yes when prompted.
You will get a similar message once the installation is complete
Make sure you follow the best practices for installation using conda as:
- Use an environment for installation rather than in the base environment using the below command:
conda create -n my-env
conda activate my-env
Note: If your preferred method of installation is conda-forge, use the below command:
conda config --env --add channels conda-forge
Verifying cx_oracle Package Installation on Linux using Conda:
Use the below command to verify if the above package has successfully installed:
conda list cx_oracle
You will get a similar message as shown below if the installation has been successful:

Installing cx_oracle Package on Linux using PIP:
Users who prefer to use pip can use the below command to install the package:
pip install cx_oracle
You will get a similar message once the installation is complete:
It is a good programming practice to install packages in a virtual environment rather than installing them globally. PIP users can use the below command to create a virtual environment:
python3 -m venv my-env
Activate the virtual environment (ie, my-env) using the below command:
source my-env/bin/activate
Verifying cx_oracle Package Installation on Linux using PIP:
Use the below command to check if the package has been successfully installed:
python3 -m pip show cx_oracle
You will get a similar message as shown below if the installation is successful:
Similar Reads
How to Install cx_oracle in Python on MacOS? In this article, we will learn how to install cx_Oracle in Python on MacOS. The cx_Oracle is a Python extension module that enables access to Oracle Database. It conforms to the Python database API 2.0 specification with a considerable number of additions and a couple of exclusions. See the homepage
2 min read
How to Install Packages in Python on Linux? To install a package in python, we use pip. The pip is a python package manager. In this tutorial, we will be discussing how we can install packages in python on a Linux system. To install packages in python on Linux, we must have python and pip installed on our Linux machine. As python comes preins
2 min read
How to Install python-docx on Linux? Word documents include formatted text wrapped in three object levels: Run objects at the lowest level, Paragraph objects at the intermediate level, and Document objects at the top level. As a result, we are unable to work with these documents using standard text editors. However, we may use the Pyth
2 min read
How to Install cx_oracle in Python on Windows? The cx_oracle package is used to connect with the Oracle database using python. In this, article, we will look into the process of installing the cx_oracle package on Windows. Pre-requisites: The only thing that you need for installing the Scrapy module on Windows are: Python PIP or Conda (depending
2 min read
How to Install Nose in Python on Linux? The nose is a Python package essentially needed for automation framework testing. Basically, Nose generates uni-test modules that will help to execute the testing result much better. Also, Nose provides another advantage in that it will auto-discover the test cases. Based on the test case result it
3 min read