McAfee Endpoint security Alert "Insufficient system resources" using cx_Oracle in Python: - python

I am using Cx_oracle for a while in Python but I can not recently import cx_oracle in Python and got this error:
ImportError: DLL load failed: Insufficient system resources exist to complete the requested service.
In addition, I get McAfee security alert as shown below:
I reinstalled cx_oracle a few times and it has not worked. Any suggestions?

The easiest answer is to use an older version of cx_Oracle using the following commands:
pip uninstall cx_Oracle
pip install -Iv cx_Oracle=="enter the version number here"
The reason is that McAfee might not integrate with the latest version of cx_Oracle or any other Python modules.
There are several other solutions including:
Uninstalling McAfee or any antivirus software that you have
Updating the drivers
Scanning the disk drivers to solve the issue
Modify the registry

Related

How do I resume installing additional node.js tools successfully without starting a duplicate chocolatey installation?

I lost my internet connection while installing additional tools for node.js. using the automatic installation option. I'm new to programming and trying to set up an environment for JavaScript on VS Code. I rebooted my system and tried resuming the installation through the Install Additional Tools for Node.js cmd prompt, but it gives a warning that there is already an existing chocolatey installation detected and thus not continuing installation. Furthermore, 2 packages failed to be upgraded from the initial error when the connection was lost, but now it says one package failed yet still showing 0/2 packages were upgraded? I uninstalled node.js and reinstalled it but it hasn't solved the issue. Is visualstudio2019-workload-vctools the only thing missing? Of which I could maybe try installing it manually? Or are the files now corrupted and I have to start over since installation didn't complete?
I don't want to mess with chocolatey itself (by uninstalling) as I read that it can destroy your pc. If there are still a few more tools or packages to install and files not corrupted, how do I successfully and safely resume the installation of all necessary tools? Python 3.10 looks to be successfully installed.
This is the message on PowerShell and the screenshot is attached as well:
"WARNING: 'choco' was found at 'C:\ProgramData\chocolatey\bin\choco.exe'.
WARNING: An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.
Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.
Chocolatey v1.1.0
Upgrading the following packages:
python;visualstudio2019-workload-vctools
By upgrading, you accept licenses for the packages.
python v3.10.5 is the latest version available based on your source(s).
visualstudio2019-workload-vctools is not installed. Installing...
visualstudio2019-workload-vctools not installed. An error occurred during installation:
The remote server returned an error: (524).
visualstudio2019-workload-vctools package files upgrade failed with exit code 1. Performing other installation steps.
The upgrade of visualstudio2019-workload-vctools was NOT successful.
visualstudio2019-workload-vctools not installed. An error occurred during installation:
The remote server returned an error: (524).
Chocolatey upgraded 0/2 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
visualstudio2019-workload-vctools (exited 1) - visualstudio2019-workload-vctools not installed. An error occurred during installation:
The remote server returned an error: (524).
Type ENTER to exit:"
PowerShell-chocolatey error
I am thinking the failure is due to the fact that I don't have visual studio 2019? It seems like everything else is fine. I'm setting up using VS Code. It doesn't seem like the issue had anything to do with me losing connection. I have attached a screenshot of the successful vs failed installations.
additional node.js tools

Psycopg2 Error MissingModuleSource but the module is installed

I am trying to connect to PostgresSql in python using psycopg2. I ran the following in my VS-Code and Mac terminal:
pip install psycopg2-binary
It says that the requirement is already satisfied. Yet, when I go to import psycopg2 I get the following error:
Import "psycopg2" could not be resolved from source Pylance(reportMissingModuleSource) [1,8]
Now I noticed that this message is from your VS Code IDE and not from the Python interpreter.
You probably misconfigured your IDE and it is not using the same interpreter, you are installing the Psycopg2 in.
There is a bug report, which may help you debug your IDE.

cx_Oracle python module installation in Linux

I want to connect to Oracle database from Python script. For that, I am I am trying to install cx_oracle Python module. Oracle is not installed on my Linux box.
While installing cx_oracle module, it throws error saying "cannot locate an Oracle software installation"
Is there any way to connect to Oracle DB from python without installing Oracle in Linux box.
-bash-4.1$ pip install cx_Oracle
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting cx_Oracle
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached cx_Oracle-5.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-PUb2Gy/cx-Oracle/setup.py", line 174, in <module>
raise DistutilsSetupError("cannot locate an Oracle software " \
distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-PUb2Gy/cx-Oracle/
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
I would definitely recommend upgrading your Python installation, if only to avoid security issues that come with unsupported software. You can download a new version from https://www.python.org/downloads. Depending on your OS there may be ways of installing alternative versions of Python.
Python 2.6 support is still possible, however. If you are using Oracle Linux 6 or RHEL 6 you can download an RPM from here.
If you need to build from source, the simplest solution is to use cx_Oracle 6 with pip using the following command:
pip install cx_Oracle --upgrade --pre
cx_Oracle 6 doesn't require an Oracle client installation to compile but cx_Oracle 5 and earlier do.
At run-time, an Oracle client is required for all versions of cx_Oracle. The simplest to install is the Oracle Instant Client which you can find here.
sqlplus_commando may be what you need indeed.
You can use this driver in your code just like so:
from sqlplus_commando import SqlplusCommando
sqlplus = SqlplusCommando(hostname='localhost', database='test',
username='test', password='test')
result = sqlplus.run_query("SELECT 42 AS response, 'This is a test' AS question FROM DUAL;")
print result

Django on Mac with mysql

I’m new in Django on Mac. I faced a problem in configuring Django environment with mysql on Mac.
The error is “
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/david/david-env/lib/python2.7/site-packages/_mysql.so, 2): Symbol not found: _mysql_shutdown
Referenced from: /Users/david/david-env/lib/python2.7/site-packages/_mysql.so
Expected in: flat namespace
in /Users/david/david-env/lib/python2.7/site-packages/_mysql.so
”
I have referred serval related answers and methods from stackoverflow, such as
pip uninstall MySQL-python
brew uninstall mysql
brew install mysql --universal
pip install MySQL-python
Unfortunately, it doesn’t work.
I have built my virtualenv of python2.7.10 on Mac. I have used “pip install ” command to install serval packages including “Django-1.10.6”, “MySQL-python-1.2.5” and “mysqlclient”.
I have installed “MySQL Server 5.7.17”, “MySQL Workbench” and “XCode”. Everything looks good , but the error can not be fixed.
I also tried to use different versions of “MySQL-python” package, including “1.2.5” and “1.2.3” (I failed to install version 1.2.4). Failed either.
I hope there is someone could help give a hand and lead me out of the trouble which destroyed my weekend. Thank you very much.
Downgrade your MySQL to 5.5 or below.
Refer to the MySQL-python 1.2.5 intro page:
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently
supported. Python-3.0 will be supported in a future release. PyPy is
supported.

Macosx yosemite installing mysql-python config error

I am trying install mysql-python but always throw error. The command is "pip install mysql-python". I searched in google and tried everything but i am still getting error.
I am using mamp, MAMP's path is "/Applications/MAMP". I tested mysql with php and there is no error, mysql is working. I also connected to mysql by navicat. I am sure that mysql is installed and it is working.
I put the error screenshoot.
You need libmysqlclient.so library to be able to install MySQLdb,
Which come with MySQL Server and client and can also be downloaded with MySQL Connector/C.
Locate the library and set your DYLD_LIBRARY_PATH to have the path where libmysqlclient.so is present.

Categories