Skip to content

Update suggestion command for building cornac from source#645

Merged
lthoang merged 2 commits intoPreferredAI:masterfrom
lthoang:fix-setup-suggestion
Sep 14, 2024
Merged

Update suggestion command for building cornac from source#645
lthoang merged 2 commits intoPreferredAI:masterfrom
lthoang:fix-setup-suggestion

Conversation

@lthoang
Copy link
Copy Markdown
Member

@lthoang lthoang commented Sep 13, 2024

Description

Update suggestion command to install required packages before building cornac from source.

Related Issues

#644

Comment thread setup.py
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this lambda function? I don't see it being used

Comment thread setup.py
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]))
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

@lthoang lthoang requested a review from qtuantruong September 14, 2024 00:00
@lthoang lthoang merged commit 0ed9584 into PreferredAI:master 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants