-
Notifications
You must be signed in to change notification settings - Fork 3k
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
RuntimeWarning: Config variable 'Py_DEBUG' is unset #3383
Comments
Important to cite that I am running it on Windows, and I just upgraded to the 8.0.0 with |
Also hitting this on Windows. Issue 3075 looks relevant. |
Is it causing an error, or just printing spurious warnings? |
Just the warnings. It appear to be working as expected. |
Okay, that much is good then! This will be because of the new, attempted emulation of SOABI support in pip 8.0. It may be need to adjusted for Windows. |
Great. I have no idea what is SOABI, so... 😅 |
Both Anaconda Python 3.4, & Python.org 3.5 x64 give this:
from this import sysconfig
print('From sysconfig:')
for k in 'Py_DEBUG', 'WITH_PYMALLOC', 'Py_UNICODE_SIZE':
try:
print(k + ': ' + repr(sysconfig.get_config_var(k)))
except:
print('Error getting %s' % k)
print('From headers:')
h_file = sysconfig.get_config_h_filename()
conf_vars = sysconfig.parse_config_h(open(h_file))
for k in 'Py_DEBUG', 'WITH_PYMALLOC', 'Py_UNICODE_SIZE':
try:
print(k + ': ' + repr(conf_vars[k]))
except:
print('Error getting %s' % k) |
@zooba do you know what would be the nicest way to find if a python is a debug build on Windows, and/or have any comments for the rest of this? pep425tags.get_abi_tag is the function trying to find this information |
I guess the main question is whether we can actually rely on those variables being defined or if we have to just treat undefined as a false. It appears that we're not going to be able to detect the difference between undefined and false and we should just remove the warning? |
Maybe it could simply be switched to a debug log ? |
That seems like a reasonable thing to do. |
Could someone who is getting this try #3399 and see if the warnings are gone? If so, can you also run with |
The most reliable check is probably going to be: any(x[0] == '_d.pyd' for x in imp.get_suffixes()) The only issue with this is that the '_d.pyd' in importlib.machinery.EXTENSION_SUFFIXES |
@zooba That's the most reliable check, specifically on Windows right? |
True, only on Windows. There is far less variation in ABI tags on Windows - with 3.5 we added a version-specific extension suffix, but the non-specific AIUI, |
Okay. I just wanted to make sure I guarded that behind a If WINDOWS: check if needed. Thanks a lot! |
Going to open this again to get the better detection that @zooba mentioned. |
It is now required for the build. Thanks to Alin Gabriel Serdean for helping figure out the correct solution here. This adds --diable-pip-version-check because upgrading pip (as suggested by the error that this option suppresses) causes pip to fail, which is in turn a bug in pip that manifests only on Windows: pypa/pip#3383. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
On Python 2.7:
|
Same here with Python 2.7:
|
Can you test with the latest develop branch? |
Same here with Python 3.5.1 c:\users\python\python35-32\lib\site-packages\pip\pep425tags.py:89: RuntimeWarning: Config |
Same with Python 2.7 c:\python27\lib\site-packages\pip\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect |
@dstufft. I just tested the development branch.
So everything is fine under Windows (at least the warnings are hidden). But this thread will be flooded until you release a new version, lol. |
Going to kick this out of 8.0.1 since we silenced the warning and the better detection can come later. |
Closing this in favor of #3535 and dropping from the 8.1 milestone. |
This issue is currently affecting psutil Windows wheels: giampaolo/psutil#810 (comment) |
From reading the comments about, it sounds like this was fixed by silencing the warnings - but I'm seeing the warnings with pip 8.1.2 under Python 2.7 and 3.4 testing on 32 bit Windows XP (yes, it is old), e.g.
More notes on the test setup at http://lists.open-bio.org/pipermail/biopython-dev/2016-June/021446.html http://lists.open-bio.org/pipermail/biopython-dev/2016-June/021448.html http://lists.open-bio.org/pipermail/biopython-dev/2016-June/021449.html |
When I run pip (any argument) I get the following message:
I think something is wrong.
The text was updated successfully, but these errors were encountered: