-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.8: ImportError: DLL load failed while importing _psycopg: The specified module could not be found. #1006
Comments
I think this is actually a different issue, this is a problem with importing the library, not with installation. |
You just have installed Postgres in your os and because library installs successfully. |
Even Im facing same issue. Any luck with this ? |
Nope, looks like this won't get fixed until Appveyor adds Python 3.8 support. I had to just downgrade back to Python 3.7 for now. :/ |
So the fix is waiting for new release to support 3.8 and walkaround is switching to 3.7 ? |
FYI, if someone wants to fix the appveyor script and install Python 3.8 there for the build, be my guest. |
So correct me if i'm wrong, but what i got from comments in other related issue threads here, the appveyor change/update is required to build and provide the binary package of psycopg2 for Python 3.8. The problem is that the issue reported here, contrary to #1004, doesn't seem to be related to the lack of the binary package. Because of the lack of a binary version, the package seems to be built by pip from sources locally, and i can also build it myself by downloading it manually. |
To be honest, psycopg2's setup.py does a VERY poor job of building from source on end user's Windows. If someone is interested in improving it... The windows environment has several challenges when building from source vs LINUX/UNIX, some of which:
Also, the PostgreSQL binaries were probably built with a newer version of the Visual C compiler, causing the potential for multiple LIBC libraries being included into the process space when pscopyg2 is imported (This shouldn't be the case, but past experience is why we build ALL dependencies in Appveyor). |
Appveyor has added Python 3.8 support. Could this please be a priority now? |
I'm having this same problem. |
Traceback (most recent call last): |
how do i fix this problem |
Hi folks, I had the same problem and using python 3.7.2, I don't know if it works on python 3.8 or not, but I just downgraded psycopg2-binary to 2.7.* and everything is good. |
Need it +1 |
Febrary 2020 - still the same problem |
@vsmelov what pip version are you using? What is the command output, possibly with a |
So, Smelov Vladimir @vsmelov: your observation is perfectly correct: it is February 2020. You know your calendar. Now, in this rainy month, what brings you to dump a passive-aggressive comment on a closed bug? Because this bug has been long closed and last psycopg release is compatible indeed with Python 3.8. Binary packages are tested after build and do work for me. If you think you have a problem please report details of what you are trying to do and about your environment. Otherwise you are just someone who thinks he is on twitter and want to create toxic atmosphere, which is a disrespectful behaviour for people who have made available for your their work for free, and for which I have no sympathy in my project. Waiting for your answer. |
I created a project yesterday evening with 3.8.2 and ran into this problem. Error can be found below. One remark... When installing the package on python38 (the -binary), it seems to compile it... But not on python37...
|
@tobiasgardner thank you for the report. The psycopg packages are available here, this is where pip would fetch them from. My questions are:
On windows the binary package and the non-binary package are the same, but please try the above with |
@dvarrazzo Hmm, there is something strange here... Noticed now that when I check pip version from PyCharm environment (settings), it says pip version 20.0.2 for Python 3.7 BUT when I run pip list in the terminal, it says 19.0.3... For the python 3.8 environment, it is the same... But when I try to upgrade from command prompt, it says that I already have 20.0.2...
Staying in the same venv from command prompt...
I.e. your assumption that the .whl file is downloaded was wrong, I get the tar.gz files. You can find the output of You can find the output of Since I did not get the .whl file, it is not possible to run this command:
|
What python version is that? the one downloaded and installed from python.org or something else? In your unedited message you had:
Does it exist? Isn't this a problem with pip?
these seem relevant for pip to misidentify your Python version - or it's actually genuinely incompatible with the wheel package. A quick googling brought me to pypa/pip#3383 and report the same problem with several other packages. Can you look into that more? It doesn't seem a problem with psycopg to me. |
Python 3.8.2, should be official version:
No the file does not exists... I guess (as you stated) that the this However, testing the same on the Python 3.7 environment, I do get the .whl file...
|
@tobiasgardner and others who see the ImportError referenced in the issue name who are using a PyCharm administered venv on Windows 10. I followed these steps to reproduce the error and then to resolve it:
@dvarrazzo It seems like something wonky with pip 19.0.2 for my case, as you said it isn't anything on the psycopg2 end. Hopefully this helps people :) |
@zthurman thank you immensely for straightening up this whole matter! Others: can you verify? Thank you. |
Can any of you report a bug to Pycharm? I can't. https://www.jetbrains.com/help/pycharm/reporting-issues.html#report-an-issue |
Hi all. I am new to Pyhton and im having this same problem when trying to import libraries Pandas and Tabula. I dont know why but i didnt have any problem when importing PyPDF2. I see @zthurman found a solution but since im new to Python I dont have PyCharm and dont know how to use it, is there any other way to solve this problem without PyCharm? |
TL; DR: update pip. See this comment
I get this error when trying to import psycopg2 in Python 3.8 on Windows 10. I already tried reinstalling (both psycopg2 and psycopg2-binary) and even reinstalling Postgres. Seems to work fine on Python 3.7.
The text was updated successfully, but these errors were encountered: