snap-python icon indicating copy to clipboard operation
snap-python copied to clipboard

Pip install not working

Open SamerAlshaer1991 opened this issue 2 years ago • 4 comments

On google colab the code "!pip install snap-stanford" not working. Command used to work 3 weeks ago. Now it is not working anymore.

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ ERROR: Could not find a version that satisfies the requirement snap-stanford (from versions: none) ERROR: No matching distribution found for snap-stanford

How to get snap running on google colab ?

SamerAlshaer1991 avatar May 25 '23 12:05 SamerAlshaer1991

Hi! Is there any update?

gyomberpet avatar Sep 19 '23 18:09 gyomberpet

you need Python3.7

try:

%%capture ! sudo apt-get install python3.7 ! sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 ! sudo update-alternatives --config python3 ! sudo apt install python3-pip ! sudo apt install python3.7-distutils ! python -m pip install snap-stanford import sys sys.path.append("/usr/local/lib/python3.7/dist-packages/") import snap

pluieciel avatar Sep 23 '23 13:09 pluieciel

problem still exists.

mokaily avatar Mar 13 '24 21:03 mokaily

Hello i could successfully install snap in python 3.10, under a miniconda environment, and SO Ubuntu. I added this line in snap-python/Makefile.config, after line 49: IFLAGS3 += -I/opt/miniconda3/include/python3.12

Basically, if it does not find the python dev libs in the versions below 3.10, this lines includes the libs for the new py version. This line may be different according to your python path: /home//anaconda3/include/python3.12 or /usr/include/python3.12

I also installed swig in the system (apt install swig), and to test it i did:

import sys
sys.path.append("swig")
import snap

YasCoMa avatar Mar 27 '24 14:03 YasCoMa