My pyramid application connect to MS SQL server using pyodbc driver. For connecting to DB, it uses Microsoft ODBC driver for Linux (http://www.microsoft.com/en-us/download/details.aspx?id=36437). Now how can I install those drivers on openshift
Thanks
Aniruddha
Someone may be able to provide a more thorough answer, but I thought this might help get you started:
While I've never installed it myself... you should be able to download the zip/tar file in your ~/app-root/data/ on your gear and then be able to extract it. Depending on how/where it installs you might be able to successfully get it implemented.
Related
I'm trying to connect to an oracle database via the cx_Oracle python library but am getting the error message "ORA-12571: TNS:packet writer failure".
My connection logic currently looks like this:
import cx_Oracle as cOr
cOr.connect("USER_NAME/USER_PASSWORD#HOST_NAME:PORT/SERVICE_NAME")
My program is running on the WSL2 environment on a windows10 machine, so somehow I think this is where the trouble originates from. The python version I'm using is 3.6.9, cx-Oracle is 8.2.1 and this instant client necessary for the cx-Oracle is in version 21_1.
I found for example this article here https://support.microfocus.com/kb/doc.php?id=7018259 on this topic. Yet all the checks they mention there succeed for me, so it shouldn't be, that the target is simply not reachable from my system.
Also just using the Oracle SQL developer from the Windows part of the machine with the same data is working just fine.
I'm a bit out of ideas of what to do on this topic and hope for somebody to maybe give me a good hint. If there is any additional information you need from me I'll gladly provide it.
I will develop a commercial Python software with the PostgreSQL database, I will use PostgreSQL version 12.2. My first question is, to run the application database (will it be a desktop application) will I need to install something related to the database on the user's computer?
And my other question is, will I be able to run my application with this version of the database on another operating system?
I saw that on the download page of version 12.2 the database only has an installer for Mac OS X and Win 64bits, will my application be compatible with other operating systems besides those two I mentioned?
I'm new to programming, thanks in advance for the clarification. <3
The database API driver/provider (in the case of Python probably psycopg2) will have to be installed on the machine where the code runs that directly accesses the database.
In the case of a 2-tier architecture (the application is installed on the end-user machine and directly accesses the database) that driver will be installed on the end-user machine, where the Python program runs.
In the case of a 3-tier architecture (the end-user machine talks to a web server via HTTP, and the Python program that accesses the database runs in an application server on the web server machine) the driver will be installed on the application server.
There are modern architectures that are even more complicated (keyword "microservices") which few people understand well enough to use properly, but let's ignore them here for simplicity's sake. The same principle applies: whoever talks to the database directly will need to have the database driver installed.
If you install psycopg2, you will also need to install the PostgreSQL client shared library libpq on the same machine, because psycopg2 is linked with it and uses it.
I have a Linux machine with no internet connection and a windows machine with an internet connection. I would like to download two python libraries with Basket on my Windows machine and then download them with my Linux machine via Basket so I can run a python script.
I tried to download the packages with basket but it gives me errors and I can't find in the documentation the command to download with proxy
I would like to download libraries with basket thru proxy.
After reading the documentation and checking the source code, I could not find a way to do this via Basket.
You could try to enforce the routing of ALL your traffic from the Windows machine to the proxy with tools like freecap, proxifier, proxycap, and configure to run behind the python executable. However, be aware that this would reroute ALL your connections, not just for Basket, python etc.
I'm working to an apllication that uses selenium for scraping a webpage and stores the data in a mysql database. I'm using mysql server 8.0 and i want to be able to use this application in a mac computer.
Is there a way to do that? If yes how?
You can install Python and MySQL server on your Mac using Homebrew. From here you can install your necessary Python dependencies via pip and run your application.
Alternatively, you could setup the application as a Docker service with containers for each component. This is probably the easiest way, though you'll need to navigate the docker learning curve.
Is there a way to query a netezza database without explicitly installing its driver? I am using ubuntu 64 bit OS, our IT support says the driver they have only works on red hat systems.
If you can get your hands on the JDBC driver, you could use the Python, jaydebeapi module, with the driver to connect to the server. Note that there are a couple quirks involved. Namely things like boolean datatypes.
You can use pyodbc.
pyodbc is an open source Python module that makes accessing ODBC
databases simple. It implements the DB API 2.0 specification but is
packed with even more Pythonic convenience.
On Ubuntu systems, all you need to do is run
sudo apt install unixodbc-dev
before attempting
pip install pyodbc
See more details from Installing pyodbc.