giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python
https://giotto-ai.github.io/gtda-docs
Other
845 stars 173 forks source link

Installation possible without sudo? #654

Closed nsauerwald closed 4 months ago

nsauerwald commented 1 year ago

Hello! I'm so sorry if this is answered somewhere - I searched issues and docs but didn't find anything. I'm trying to use giotto-tda on a cluster on which I don't have sudo privileges, and I can't seem to find an installation method that doesn't require them. The pip install command asks for my sudo password after checking requirements, and the developer installation also requires sudo. Any advice would be greatly appreciated!

beew commented 1 year ago
pip install -U giotto-tda --user

will install it in your $HOME

ulupo commented 1 year ago

Thanks @beew! Indeed, this should be the correct solution to @nsauerwald's query.

longyuxi commented 1 year ago

pip install --user didn't work for me (log omitted since I figured out how to install without using this).

Update:

I got my installation working, so I'll leave a note for anyone who is also struggling to install this on their cluster. The key is to install a Python version with a prebuilt wheel (check the Python versions supported by the latest wheels on the release page), this way you don't have to end up building this package from source. For me, I created another environment with Python 3.10, downloaded the wheel file, and ran pip install giotto_tda_..._x86_64.whl.

In other words, the following three commands:

conda create -n gtda python=3.10

# Find the following download link on the release page, e.g. https://github.com/giotto-ai/giotto-tda/releases/tag/v0.6.0

wget https://github.com/giotto-ai/giotto-tda/releases/download/v0.6.0/giotto_tda-0.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

pip install giotto_tda-0.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl