hiruna72 / squigualiser

Visualise and analyse nanopore (ONT) raw signals
https://hiruna72.github.io/squigualiser/
MIT License
100 stars 1 forks source link

Setup script exited with error: SandboxViolation #25

Closed Grant-Fox closed 10 months ago

Grant-Fox commented 1 year ago

Hi squigualiser team!

I encountered an error while trying to run the squigualiser program. Commands ran: git clone https://github.com/hiruna72/squigualiser.git cd squigualiser python3 -m venv venv3 source venv3/bin/activate pip install --upgrade pip pip install --upgrade setuptools wheel export PYSLOW5_ZSTD=1 python setup.py install

The specific error message is as follows: error: Setup script exited with error: SandboxViolation: mkdir('/PATH/TO/DIRECTORY/easy_install-qfz8h6wq/pysam-0.21.0/build', 511) {}

It seems that the package setup script is attempting to modify files outside the EasyInstall build area, resulting in an aborted installation. EasyInstall is unable to safely install the package, and there may be limitations in supporting alternative installation locations even if the setup script is executed manually.

Could there be some provided guidance or assistance regarding this problem? Any suggestions for a possible fix or workaround would be greatly appreciated.

Thank you for your attention to this matter.

Grant

hiruna72 commented 1 year ago

Hello @Grant-Fox,

Which python version are you using? Recommended version is 3.8 or higher. Can you please try the latest dev branch? git clone --branch dev https://github.com/hiruna72/squigualiser.git

Grant-Fox commented 1 year ago

Hello! @hiruna72

I am using python 3.9.6.

In regards to running the dev branch, it gave me the same error.

"error: Setup script exited with error: SandboxViolation: mkdir('/PATH/TO/DIRECTORY/easy_install-786zo0lv/pysam-0.21.0/build', 511) {}

he package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available."

Psy-Fer commented 1 year ago

Hey,

Just to chime in.

When you have your environment active, what does it show when you run which python

If it's the python3 link In the environment, then all good. Just noticed the setup.py install command being run with python rather than python3 and if you have python2 on the machine, it might get confused.

James.

Grant-Fox commented 1 year ago

Hello! I did not realize I was not using python3 during the setup.py install but I made this change and it did not fix my problem. I got the same error as previous.

hiruna72 commented 1 year ago

Hello @Grant-Fox,

I have not used easy_install. But similar issues have been reported regarding easy_install. Easy_install is now deprecated as well. I quite don't understand how easy_install takes control over installing packages when you follow the commands as listed in the Readme? My idea was it is using pip.

git clone https://github.com/hiruna72/squigualiser.git
cd squigualiser
python3.8 -m venv venv3
source venv3/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools wheel

export PYSLOW5_ZSTD=1 # if your slow5 file uses zstd compression and you have zstd installed, set
python setup.py install
squigualiser --help

However, as an alternative could you please try the conda installation?

git clone https://github.com/hiruna72/squigualiser.git
cd squigualiser
conda create -n squig python=3.8.0 -y
conda activate squig

export PYSLOW5_ZSTD=1 # if your slow5 file uses zstd compression and you have zstd installed, set

python setup.py install
squigualiser --help
Grant-Fox commented 1 year ago

@hiruna72,

I am attempting to install conda on to my local computer. To create the virtual environment with the python=3.8.0 is giving me issues. I am getting PackagesNotFoundError when attempting to build the squig environment with conda.

hiruna72 commented 11 months ago

Hello @Grant-Fox,

Really sorry for the late response. Squigualiser is now available through pip. Could you please try the following commands.

python3.8 -m venv venv3
source venv3/bin/activate
pip install --upgrade pip

pip install squigualiser

squigualiser --help

If it fails, could you try the following. @hasindu2008 handled the pysam installation to make this precompile binary. The caveat is this binary only works on common Linux distributions.

wget https://github.com/hiruna72/squigualiser/releases/download/v0.3.0/squigualiser-v0.3.0-linux-x86-64-binaries.tar.gz -O squigualiser.tar.gz
tar xf squigualiser.tar.gz
cd squigualiser
./squigualiser --help

The latest release is at https://github.com/hiruna72/squigualiser/releases/tag/v0.3.0

hiruna72 commented 10 months ago

I will close this issue for now. Feel free to reopen if you face difficulties installing.