PostgreSQL PL/Python could not load library plpython3u - python

I am trying to install the PL/Python extension for PostgreSQL. Executing the command CREATE EXTENSION plpython3u; results into the following error message:
ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/plpython3.dll": The specified module could not be found.
I have:
double checked that the C:\Program Files\PostgreSQL\11\lib\plpython3.dll is present
read the instruction bundled with my installation (doc/installation-notes.html). They mentioned the python version they have used to compile the binaries (Python 3.6.5)
set the PATH to python version 3.6.8 (Python36_64, Python36_64/Scripts)
downloaded embeddable Python version 3.6.5 added this version to the PATH
double checked with both versions 3.6.8 and 3.6.5 that they were found by using this dependency checker Dependencies in both cases it has found the python36.dll
tried 32 bit version of python but the Dependencies checker did not find the python dll so assuming it is using 64 bit.
reopened powershell after each change I did to the PATH variable.
This is my PATH:
I am running:
version
------------------------------------------------------------
PostgreSQL 11.4, compiled by Visual C++ build 1914, 64-bit
(1 row)
Windows 10 Pro 64bit
PostgreSQL EnterpriseDB installation

I was able to resolve this issue by using a workaround by copying the python36.dll (3.6.8) into the system32 folder.

First,you have to verify that python was installed correctly without any bugs,while installing python we have to choose customize installation instead of giving Install now,follow this method this will useful..

Related

DLL Load Failed (Open cv2)

i tried many solutions for that error but didn't solved
ImportError: DLL load failed while importing cv2: The specified module could not be found.
Make sure you have installed right versions. Follow the below link for the compatible versions installed.
https://www.tensorflow.org/install/source_windows#gpu
https://www.drdataking.com/post/install-gpu-support-to-tensoflow-on-windows/
I was too getting similar issue:
DLL load failed while importing _multiarray_umath: The specified module could not be foundDLL load failed while importing _multiarray_umath: The specified module could not be found
Solution was the environment variable path was not set properly. Please find the image below:
Solution
in python 3.8 i fixed a similar error when compiling with cxfreeze cv2 dll load failed ,
the problem was that i had another version of python 3.6 installed and although environment variable path from python 3.8 was first, cxfreeze still loaded opencv from python 3.6 causing the error in the output file,
I fixed it by moving python 3.6 to another location so not get detected by cxfreeze, be careful with the environments variable path if you have other versions of python installed when compiling.
try miniconda with Python 3.6 is more stable ,
https://repo.continuum.io/miniconda/
Miniconda3-4.5.4 was the last Python 3.6 miniconda package.
Try to Install other versión of opencv
pip install opencv-contrib-python
Install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
Install media feature pack only if you use win10
https://www.microsoft.com/en-us/software-download/mediafeaturepack
this article may interest you
DLL load failed error when importing cv2

I have a error on installing CPLEX 12.10 to Python 3.8

I am trying to install CPLEX studio 12.10 to Python 3.8. I'm using Visual studio code editor.
Referring to https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.8.0/ilog.odms.cplex.help/CPLEX/GettingStarted/topics/set_up/Python_setup.html, I use the command "python setup.py install --home C:\Program Files\IBM\ILOG\CPLEX_Studio1210\cplex\python\3.7\x64_win64". But error " can't open file 'setup.py': [Errno 2] No such file or directory" is appeared.
How to solve this problem?. I also checked that setup.py is in the above folder.
You need to find setup.py first by going the folder that CPLEX is installed (use the path you wrote after install --home). Furthermore, the path after install --home is to the directory where your Python is installed. See this answer for details.
Also, CPLEX 12.10 doesn't support Python 3.8 for now.
There is a workaround for this problem if you are able to modify the underlying python library shipped with CPLEX. Essentially, the python interface is the same, but the program will check your python version and prevent you from installing and using it if the version does not match.
Go to /path/to/installation/cplex/python, you should see 2 directories (3.6 and 3.7). Make a copy of 3.7 and rename it as your python version, for example, 3.8 or 3.9. In /path/to/installation/cplex/python/<your_python_version>/<your_os>/setup.py and /path/to/installation/cplex/python/<your_python_version>/<your_os>/cplex/_internal/_pycplex_platform.py, remove the code that checks python version.
The above is tested on x86_64 Linux with python 3.9.2 using the official docplex library (you will need to export an environmental variable, see the official documentation). I suppose if you run setup.py to install the cplex python libaray, it should also work. Beware this is not officially supported, and do it at your own risk.

fatal error LNK1112 when nuitka compile python

When I was compiling my python project using Nuitka, there came an error:
python36.lib(python36.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
I am using Windows 10 64bit, Nuitka 0.5.28.1 Python3.6 64 bit, Visual Studio 2017 Community and Python 3.6.3 |Anaconda custom (64-bit)|.
I want to build a x64 exe file.
I've searched Internet saying that something Configuration Properties, Target Machine. However, I don't have an VS project when using Nuitka, so I don't know where to config.
I just ran into this problem today.
I think it is because anaconda is probably compiled with a different C compiler. I just used the normal python (no anaconda) and pipenv to have environments.

Fatal error in launcher: Unable to create process using '"' in python

I had python 2.7 before and then I installed python 3.4.The OS is windows 10
I have renamed
C:\python27\python.exe to python2.exe (when I run python2 --version it shows correct version)
and
C:\python34\python.exe to python3.exe (when I run python3 --version it shows correct version)
I have set the path variable manually and there is no space etc.
I was trying to create a virtual environment and assign python34 to this new environment.
I was going through this SO reference -- Using VirtualEnv with multiple Python versions on windows
prompt>> virtualenv -p c:\Python34\python3.exe casenv
But I got an error--
Fatal error in launcher: Unable to create process using '"'
Do I need to install virtualenv again for python34 or somewhere I need to set virtualenv path for each python installation.
Any help is highly welcomed.
In my case, i had installed python 3.6 and uninstalled python 2.7 when i got this error.
Completely deleting the C:\Python2.7 directory did the trick.
This error is usually caused because of python directory of different versions stored at same location.
i.e in my case I was using python 3.5.X for development and when I updated to 3.7.6 I got this error.
People on internet suggest that it is because of pip but main cause is 2 or more python directory.
The following steps should fix it:
Uninstall previous python version (or use virtual environment if you want to play with multiple python version)
Delete the python directory you are not using (as it causes confusion for terminal to understand which python path it should pick to execute the command)
and this should fix the error of
fatal error in launcher unable to create process using ' '
Pip version: 10.0.0
Python version: 3.6.5 64 bit
Operating system: Windows 7 Ultimate, Service Pack 1, 64-bit
Description:
After upgrading pip to the version 10.0.0 (from Pycharm, that is using pip as a package) any attempts to start updated pip cause an error:
Fatal error in launcher: Unable to create process using '""c:\program files\python 3.6\python.exe" "C:\Program Files\Python 3.6\Scripts\pip.EXE"'
Command python -m pip works as expected.
I found text "Fatal error in launcher" only in executables:
src\pip_vendor\distlib\t32.exe
src\pip_vendor\distlib\t64.exe
and in the pip.exe itself.
After
python -m pip uninstall pip
easy_install.exe pip
error disappeared.
It is interesting, that initially pip.exe had almost the same size as t64.exe, now it significantly shorter.
If someone came after installing a newer version like 3.X and uninstalled the older version, what you need to do is to delete the old version's folder from C Drive.
Clean Fix (Windows)
The fastest way to fix the issue you were facing is to uninstall and reinstall.
Why it happened?
You probably moved the directory where python was installed.
You probably have both environmental variables listed in Environmental Variables.
Things to consider
You can only use 1 active version of python at a time if you use the MSI installer.
If you downloaded the zip file of Python, you can have unlimited versions in your computer BUT you can only have 1 active version under Environmental Variables.
You can always use any version of Python explicitly by writing the direct path to the specific location of the version of Python.

I cannot install dipy library for python, why ? In the description I explain what I did

I went to http://nipy.org/dipy/installation.html and install nibabel, then I when I wanted to install dipy, there where 2 problems:
Wheel was not built
and vcvarshall.bat not found.
What I did ?
Install Setuptools in site-pakcages
download Setuptools-34.3.1-py2.py3-none-any.whl (md5) and save in site-packages
I also try
python setup.py install --compiler=mingw32ç
and
If you get an error saying unable to find vcvarsall.bat then you need to create a file called pydistutils.cfg in notepad and give it the contents
[build]
compiler=mingw32
But setup.py de system it did not find, and I still have vcvarshall.bat not found.
what I need to do?
I am using, Windows 7, Python 3.5.1 and Anaconda 2.5.0 (64 bit)
You will almost certainly find it easier to install third-party packages if you adopt virtual environments. When done correctly you will then not need admin privileges to install packages into virtualenvs. The HitchHikers' Guide to Python contains more information about this.
The vcvarsall.bat is, I believe, a part of the Visual Studio (the Express version is available at no cost) environment. It's required when you are trying to build a compiled Python extension as described in this article. I'm not sure how that will play with mingw.
So, I installed via ANACONDA but , when I go to python, and I want to import dipy it says: No modle named dipy
Solved ! Well I had python 3.5 and dipy has some issues with that version, so I installed Anaconda with python 2.7 , installed visual c++9 and follow the steps on the web !

Categories