-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
No module named 'regex._regex'; 'regex' is not a package #1207
Comments
I'm hitting the same thing. I can reproduce this without black too just by opening a repl:
|
@daviddavis So it's the fault of https://pypi.org/project/regex/ ? Update: I've created https://bitbucket.org/mrabarnett/mrab-regex/issues/349/no-module-named-regex_regex-regex-is-not-a - just in case. |
Yea, if I pin |
Looks like they were doing some work recently that may have caused this: https://bitbucket.org/mrabarnett/mrab-regex/commits/all Black isn't pinned to any specific version of regex: https://github.com/psf/black/blob/master/setup.py#L72 |
Seeing this now with moto: https://travis-ci.org/spulec/moto/jobs/625868515?utm_medium=notification&utm_source=github_status |
Will there be a release for this fix? Timeframe? If not I can pin the requirement in my team's requirements file, just want to know whether I should or just wait a bit. |
Also have the same issue. What happened? |
Have the same on Google Cloud App engine |
|
Because psf/black#1207
@TomFaulkner I'd accept a PR to pin Black's dependency to a non-broken version of |
This comment has been minimized.
This comment has been minimized.
No need for additional comments saying that yet more people hit this issue. |
I appreciate the response. |
Because psf/black#1207
Because psf/black#1207
Pin the regex dependency to the last known good release. I would use a y release but it doesn't appear that regex is using sematic versioning. Also, it appears that the 2019.12.9 release may have issues (although it could just be improper packaging of the wheel). See related issue psf#1207.
Understood. I opened #1208 in hopes of preventing future breakages when a new regex is released. |
FWIW, another user-side workaround that does not require a new release of Black nor
Also works in a
|
Pin the regex dependency to the last known good release. I would use a y release but it doesn't appear that regex is using sematic versioning. Also, it appears that the 2019.12.9 release may have issues (although it could just be improper packaging of the wheel). See related issue psf#1207.
Sorry, I hadn't seen your PR, but please see #1209 for an alternative approach. |
Our builds started working again, it looks like the issue is addressed at regex. https://bitbucket.org/mrabarnett/mrab-regex/issues/343/wheel-for-linux#comment-55284973 |
Summary: CircleCI failed due to a recent change in regex, black detected it and broke the CircleCI psf/black#1207 Workaround: pin regex version to last working version Differential Revision: D19129020 fbshipit-source-id: c4277ff3f59930bcbcce5ce13e26214963d9a80f
Summary: Pull Request resolved: #1199 CircleCI failed due to a recent change in regex, black detected it and broke the CircleCI psf/black#1207 Workaround: pin regex version to last working version Reviewed By: hikushalhere, m3rlin45 Differential Revision: D19129020 fbshipit-source-id: f17cd32d4424f33482c482bb07d9e0e7a807240b
mhausenblas/mkdocs-deploy-gh-pages needs a requirements file, else it tries to install the repo-level requirements, which typically are not needed for the docs site, see: mhausenblas/mkdocs-deploy-gh-pages#53 introduce requirements file specific to the docs site, fixing an issue with trying to install the dev-requirements.txt the underlying issue was with trying to install black into the Docker image used by this GitHub Action (squidfunk/mkdocs-material:7.1.8), see: https://github.com/mhausenblas/mkdocs-deploy-gh-pages/blob/master/Dockerfile recent versions of black depend on regex, which has a history of trouble with Linux wheel availability and support * psf/black#1207 * https://bitbucket.org/mrabarnett/mrab-regex/issues/343/wheel-for-linux * https://bitbucket.org/mrabarnett/mrab-regex/issues/349/no-module-named-regex_regex-regex-is-not-a the Docker image does not have gcc available; rather than installing a build chain to build regex to enable the install of black, which isn't even used by the docs site, the simpler fix was to create a docs/requirements.txt and point the GitHub Action at it instead similar report on the Action repo: mhausenblas/mkdocs-deploy-gh-pages#105
You can try reinstalling the or just works for me :) |
I also encountered this issue and none of the various pip commands in this thread or elsewhere on the Internet helped. I was using a new Macbook Pro with the default python 3.8 installation. I wrote the steps I took to fix it here: mrabarnett/mrab-regex#413 (comment) |
Traceback (most recent call last):
File "/usr/local/bin/black", line 5, in
from black import patched_main
File "/usr/local/lib/python3.8/site-packages/black.py", line 15, in
import regex as re
File "/usr/local/lib/python3.8/site-packages/regex.py", line 402, in
import _regex_core
File "/usr/local/lib/python3.8/site-packages/_regex_core.py", line 21, in
import regex._regex as _regex
ModuleNotFoundError: No module named 'regex._regex'; 'regex' is not a package
The text was updated successfully, but these errors were encountered: