Issue during pip install
danielstreeter opened this issue · comments
Description
pip install recommenders causes an issue with installing PyYAML. It appears that PyYAML 5.4.1 has a bug in it.
In which platform does it happen?
MacOS
How do we replicate the issue?
create a conda environment with python 3.9
run pip install recommenders
Expected behavior (i.e. solution)
Other Comments
pyyaml is not a dependency of recommenders. I suggest to install other version of that library. In case it doesn't work, you might want to try recommenders from source.
Also running into this issue. Wasn't able to find a workaround using another version of pyyaml or by installing from source. Do you have any other recommendations?
@arsedler9 I ran into this problem earlier today. I got around it by downloading the "source distribution" from here https://pypi.org/project/recommenders/#files.
After copying these files to a directory inside my Anaconda environment, I edited part of setup.py so it would use newer versions of a few packages:
install_requires = [
"numpy>=1.19", # 1.19 required by tensorflow 2.6
"pandas>1.0.3,<2",
"scipy>=1.0.0,<2",
"tqdm>=4.31.1,<5",
"matplotlib>=2.2.2,<4",
"scikit-learn>=1.4.0",
"numba>=0.38.1,<1",
"lightfm>=1.15,<2",
"lightgbm>=4.2.0",
"memory_profiler>=0.54.0,<1",
"nltk>=3.4,<4",
"seaborn>=0.8.1,<1",
"transformers>=2.5.0,<5",
"bottleneck>=1.2.1,<2",
"category_encoders>=1.3.0,<2",
"jinja2>=2,<3.1",
"pyyaml>=6.0.1",
"requests>=2.0.0,<3",
"cornac>=1.1.2,<2",
"retrying>=1.3.3",
"pandera[strategies]>=0.6.5", # For generating fake datasets
"scikit-surprise>=1.0.6"
]
I might have changed more here than I needed to in the excerpt above, but the important part for me was changing the version for pyyaml to 6.0.1.
After I edited setup.py, I used pip to install the downloaded version of recommenders
pip install '<path to the edited /recommenders directory in my Anaconda environment files>' --verbose
I ran into some more problems after that, but I think I resolved all of them by installing various packages that the errors mentioned.
I hope this helps!
Thanks @cordulack! Updating setup.py seems to have worked for me:
conda create -n recommenders python=3.9
conda activate recommenders
git clone git@github.com:recommenders-team/recommenders.git
cd recommenders
git checkout 1.1.1
Edit this line to pyyaml>=6.0.1
.
pip install -e .