Skip to content
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

"Warning cannot install the regex module. Unicode will not be fully supported." during installation on MacOS #3007

Closed
12 tasks done
tupos opened this issue Apr 30, 2018 · 4 comments

Comments

@tupos
Copy link

tupos commented Apr 30, 2018

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, including what I expected to happen and what actually happened.
  • If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

  • What did you do?

During upgrade to the latest version now there is a warning

...
[100%] Built target ycm_core
Collecting regex==2018.02.21
Installing collected packages: regex
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/basecommand.py", line 228, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 335, in run
    use_user_site=options.use_user_site,
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
    **kwargs
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 748, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 961, in move_wheel_files
    warn_script_location=warn_script_location,
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/wheel.py", line 216, in move_wheel_files
    prefix=prefix,
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/locations.py", line 165, in distutils_scheme
    i.finalize_options()
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 248, in finalize_options
    "must supply either home or prefix/exec-prefix -- not both")
distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both
WARNING: cannot install the regex module. Unicode will not be fully supported.
   Compiling rust-crypto v0.2.36
...

In order to upgrade I used the standard procedure

python3 install.py --clang-completer --go-completer --rust-completer
  • What did you expect to happen?

There should not be a warning

Diagnostic data

Output of vim --version

vim version.

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/3s/qvczc_1d7274p1mykqctlxmh0000gn/T/ycm_z5vd_e4f
.log
-- Server Python interpreter: /usr/local/opt/python/bin/python3.6
-- Server Python version: 3.6.5
-- Server has Clang support compiled in: True
-- Clang version: clang version 6.0.0 (tags/RELEASE_600/final)
-- No extra configuration file found
-- Server running at: http://127.0.0.1:54324
-- Server process ID: 8216
-- Server logfiles:
--   /var/folders/3s/qvczc_1d7274p1mykqctlxmh0000gn/T/ycmd_54324_stdout__xw96wx6
.log
--   /var/folders/3s/qvczc_1d7274p1mykqctlxmh0000gn/T/ycmd_54324_stderr_e5fam_9m
.log

Contents of YCM, ycmd and completion engine logfiles

log files

OS version, distribution, etc.

MacOS High Sierra 10.13.4 (17E202)

Output of build/install commands

install log

@bstaletic
Copy link
Collaborator

Take a look at #3001. YouCompleteMe will work even without the regex module.

@micbou
Copy link
Collaborator

micbou commented Apr 30, 2018

This is related to issue pypa/pip#4106. Relying on pip to install the regex module was definitely a bad idea. We are working on a better solution. See PR ycm-core/ycmd#1017.

@tupos
Copy link
Author

tupos commented Apr 30, 2018

Thanks for the information. I will have a look at that thread.

@karanchawla
Copy link

Create a file ~/.pydistutils.cfg
and add the following to the file —

[install]
prefix=

Now, you'll be able to install YCM with regex.
WARNING: This breaks the normal pip system and make sure to delete this file after installation is complete.
Reference: https://stackoverflow.com/questions/24257803/distutilsoptionerror-must-supply-either-home-or-prefix-exec-prefix-not-both

zzbot added a commit that referenced this issue May 2, 2018
[READY] Update ycmd

Include the following changes:

 - PR ycm-core/ycmd#919: cache include paths;
 - PR ycm-core/ycmd#1013: increase Python 2 requirement to 2.7.1;
 - PR ycm-core/ycmd#1015: force MSVC to treat source files as UTF-8 encoded;
 - PR ycm-core/ycmd#1017: bundle and compile the regex module;
 - PR ycm-core/ycmd#1020: use `sysconfig` instead of `distutils.sysconfig` in build script.

Fixes #3001.
Fixes #3007.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3010)
<!-- Reviewable:end -->
andreaswachowski added a commit to andreaswachowski/dotfiles that referenced this issue Jan 29, 2021
It was necessary due to ycm-core/YouCompleteMe#3007

That issue has long been fixed.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants