Skip to content

Install throws a Python exception #3001

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

Closed
10 of 12 tasks
oscu0 opened this issue Apr 25, 2018 · 2 comments
Closed
10 of 12 tasks

Install throws a Python exception #3001

oscu0 opened this issue Apr 25, 2018 · 2 comments

Comments

@oscu0
Copy link

oscu0 commented Apr 25, 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?

Attempt to install YCM's engine

  • What actually happened?

Installation throws a DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both exertion. Apparently it's linked to Homebrew's Python, and uninstalling that temporarily alleviated the error - however, the install hasn't failed before with the same configuration. While it is related to my configuration, having a Homebrew Python 2 is very common - it's a dependency of lots of things, such as mercurial. Python 3 is a dependency of Hombrew vim itself - even more problematic to uninstall. FAQ's advice re:Hombrew Python does not help and should probably be updated to include the --ignore-dependencies flag.

Diagnostic data

Output of `vim --version

gist

Output of YcmDebugInfo

Not applicable.

Contents of YCM, ycmd and completion engine logfiles

Not applicable.

OS version, distribution, etc.

macOS 10.13.4 17E202

Output of build/install commands

gist

@oscu0 oscu0 changed the title Install fails Install throws a Python exception Apr 25, 2018
@puremourning
Copy link
Member

Is YCM working? The install actually didn’t fail.

@puremourning
Copy link
Member

WARNING: cannot install the regex module. Unicode will not be fully supported.

This is ok. YCM will work fine without regex module.

zzbot added a commit to ycm-core/ycmd that referenced this issue May 2, 2018
[READY] Bundle and compile the regex module

It turns out that using pip to download and install the regex module in a specific folder is too much to ask. See issues ycm-core/YouCompleteMe#3001 and #1014. There is also the issue that pip is not always available. The default Python doesn't have pip on macOS and the `python-pip` or `python3-pip` packages must be installed on Ubuntu. We need a better solution.

This PR proposes to vendor the regex sources as a Git submodule and compile the module when running the `build.py` script. The [submodule](https://github.com/micbou/regex) is a clone of [the official repository](https://bitbucket.org/mrabarnett/mrab-regex) (which is a mercurial repository hosted on BitBucket) containing a `CMakeLists.txt` file to easily compile the module with CMake. We put the submodule in a different folder than `third_party/regex` to avoid the error that a directory already exists when pulling the changes with Git.

Finally, we add the `--no-regex` option to the `build.py` script to disable compilation of the regex module. This allows running the ycm_core tests or benchmarks without building the module.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1017)
<!-- Reviewable:end -->
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 -->
@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

2 participants