Update suggestion command for building cornac from source#645
Merged
lthoang merged 2 commits intoPreferredAI:masterfrom Sep 14, 2024
Merged
Update suggestion command for building cornac from source#645lthoang merged 2 commits intoPreferredAI:masterfrom
lthoang merged 2 commits intoPreferredAI:masterfrom
Conversation
qtuantruong
reviewed
Sep 13, 2024
| import numpy as np | ||
| import scipy | ||
| except ImportError: | ||
| escape_dependency_version = lambda x: '"{}"'.format(x) if "<" in x or "=" in x or ">" in x else x |
Member
There was a problem hiding this comment.
Do we need this lambda function? I don't see it being used
lthoang
commented
Sep 13, 2024
| exit( | ||
| "We need some dependencies to build Cornac.\n" | ||
| + "Run: pip3 install Cython numpy scipy" | ||
| + "Run: pip3 install Cython {}".format(" ".join([escape_dependency_version(x) for x in INSTALL_REQUIRES])) |
Member
Author
There was a problem hiding this comment.
@tqtg Just updated the usage of lambda function. There is some packages with specified versions. The output of the suggested command looks like this Run: pip3 install Cython "numpy<2.0.0" "scipy<=1.13.1" tqdm powerlaw
qtuantruong
approved these changes
Sep 14, 2024
qtuantruong
pushed a commit
to qtuantruong/cornac
that referenced
this pull request
Oct 25, 2025
…I#645) * Update suggestion command for building cornac from source * Fix install command using escape dependency with specified version
qtuantruong
pushed a commit
to qtuantruong/cornac
that referenced
this pull request
Oct 25, 2025
…I#645) * Update suggestion command for building cornac from source * Fix install command using escape dependency with specified version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update suggestion command to install required packages before building cornac from source.
Related Issues
#644