Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macs2 installation error #101

Closed
Umaarasu opened this issue Feb 7, 2023 · 18 comments
Closed

Macs2 installation error #101

Umaarasu opened this issue Feb 7, 2023 · 18 comments
Labels
question Further information is requested

Comments

@Umaarasu
Copy link

Umaarasu commented Feb 7, 2023

Hi,
I get this error when I try to install scenicplus using conda. In Macs githib page few others have also reported this error while installing scenicplus. In one thread they have closed the report saying install Macs3. But installing Macs3 does not help with installing scenic plus package dependencies which requires Macs2. Could this be fixed?

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [4 lines of output]
Requirement already satisfied: numpy>=1.17 in /tmp/pip-build-env-880f00gu/overlay/lib/python3.8/site-packages (1.24.2)
error in MACS2 setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after name and no valid version specifier)
numpy>=>=1.17
^
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Version :
OS: Linux
Python version 3.8.15

@Umaarasu Umaarasu added the question Further information is requested label Feb 7, 2023
@Ajaingithub
Copy link

Hi,
I am also facing the same error.

@Umaarasu
Copy link
Author

Umaarasu commented Feb 9, 2023

Hi, I am also facing the same error.

Did you solve this?

@SeppeDeWinter
Copy link
Collaborator

SeppeDeWinter commented Feb 10, 2023

Hi @Ajaingithub and @Umaarasu

I was able to reproduce the error. Below you can find a quick patch, however I will try to update the code to using MACS3 instead.

1. Create conda environment

conda create --name scenicplus python=3.8
conda activate scenicplus

2. Patch and install MACS2

Download and unzip MACS2 source code

wget https://github.com/macs3-project/MACS/archive/refs/tags/v2.2.7.1.tar.gz -O MACS.tar.gz
tar -xvf MACS.tar.gz

Patch MACS2

cd MACS-2.2.7.1
sed -i 's/install_requires = \[f"numpy>={numpy_requires}",\]/install_requires = \[f"numpy{numpy_requires}",\]/' setup.py

Install MACS2

pip install -e .

3. Install SCENIC+

cd ..
git clone https://github.com/aertslab/scenicplus
cd scenicplus
pip install -e .

I hope this helps.

Best,
Seppe

@zqzneptune
Copy link

Thanks! This works for me.

Hi @Ajaingithub and @Umaarasu

I was able to reproduce the error. Below you can find a quick patch, however I will try to update the code to using MACS3 instead.

1. Create conda environment

conda create --name scenicplus python=3.8
conda activate scenicplus

2. Patch and install MACS2

Download and unzip MACS2 source code

wget https://github.com/macs3-project/MACS/archive/refs/tags/v2.2.7.1.tar.gz -O MACS.tar.gz
tar -xvf MACS.tar.gz

Patch MACS2

cd MACS-2.2.7.1
sed -i 's/install_requires = \[f"numpy>={numpy_requires}",\]/install_requires = \[f"numpy{numpy_requires}",\]/' setup.py

Install MACS2

pip install -e .

3. Install SCENIC+

cd ..
git clone https://github.com/aertslab/scenicplus
cd scenicplus
pip install -e .

I hope this helps.

Best, Seppe

@Umaarasu
Copy link
Author

Umaarasu commented Feb 11, 2023

Hi @Ajaingithub and @Umaarasu

I was able to reproduce the error. Below you can find a quick patch, however I will try to update the code to using MACS3 instead.

1. Create conda environment

conda create --name scenicplus python=3.8
conda activate scenicplus

2. Patch and install MACS2

Download and unzip MACS2 source code

wget https://github.com/macs3-project/MACS/archive/refs/tags/v2.2.7.1.tar.gz -O MACS.tar.gz
tar -xvf MACS.tar.gz

Patch MACS2

cd MACS-2.2.7.1
sed -i 's/install_requires = \[f"numpy>={numpy_requires}",\]/install_requires = \[f"numpy{numpy_requires}",\]/' setup.py

Install MACS2

pip install -e .

3. Install SCENIC+

cd ..
git clone https://github.com/aertslab/scenicplus
cd scenicplus
pip install -e .

I hope this helps.

Best, Seppe

@SeppeDeWinter ..Thanks for fixing this. It works now!

@qdong2023
Copy link

qdong2023 commented Mar 11, 2023

Hello, when I run the code, it shows the error like this. Do you know how to fix this? Thanks!

Patch MACS2
cd MACS-2.2.7.1
sed -i 's/install_requires = [f"numpy>={numpy_requires}",]/install_requires = [f"numpy{numpy_requires}",]/' setup.py

output:
cd: no such file or directory: MACS-2.2.7.1
sed: 1: "setup.py": unterminated substitute pattern

@qdong2023
Copy link

Hello, when I run the code, it shows the error like this. Do you know how to fix this? Thanks!

Patch MACS2 cd MACS-2.2.7.1 sed -i 's/install_requires = [f"numpy>={numpy_requires}",]/install_requires = [f"numpy{numpy_requires}",]/' setup.py

output: cd: no such file or directory: MACS-2.2.7.1 sed: 1: "setup.py": unterminated substitute pattern

Just a follow up. I fixed this issue by making a small modification of this code:

sed -i '' 's/install_requires = [f"numpy>={numpy_requires}",]/install_requires = [f"numpy{numpy_requires}",]/' setup.py

Not sure if this is professional, but it works for me!
(MacOS, Python 3.8.16)

@degrainger
Copy link

As an alternative, I was able to resolve this issue by first installing MACS2 to the created conda environment with conda install -c bioconda macs2 and then rerunning pip install -e ..

@li-xuyang28
Copy link

I was trying to run it on colab, the installation tips above were super helpful, but the RAM wasn't even sufficient to run the cisTopic part on 10X PBMC (for QC). Now I'm trying to run it locally (MacOS, m2, Vetura 13.2.1) but couldn't get the installation to work.

When I try to install macs2 from a folder as suggested (with the modification to sed for MacOS), I got the following error:

Processing ./MACS-2.2.7.1
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      CRITICAL: Python version must >= 3.6!
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
!pip -V
pip 22.3.1 from /usr/apps/anaconda3/lib/python3.10/site-packages/pip (python 3.10)

And when I try the above option to conda install then pip install -e., I got the following error:

Specifications:

  - macs2 -> python[version='>=3.11,<3.12.0a0|>=3.5,<3.6.0a0']

Your python: python=3.10

Any advice on how to proceed? Thanks!

@mpiersonsmela
Copy link

I am also encountering the same error.

@wakelin-g
Copy link

I was trying to run it on colab, the installation tips above were super helpful, but the RAM wasn't even sufficient to run the cisTopic part on 10X PBMC (for QC). Now I'm trying to run it locally (MacOS, m2, Vetura 13.2.1) but couldn't get the installation to work.

When I try to install macs2 from a folder as suggested (with the modification to sed for MacOS), I got the following error:

Processing ./MACS-2.2.7.1
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      CRITICAL: Python version must >= 3.6!
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
!pip -V
pip 22.3.1 from /usr/apps/anaconda3/lib/python3.10/site-packages/pip (python 3.10)

And when I try the above option to conda install then pip install -e., I got the following error:

Specifications:

  - macs2 -> python[version='>=3.11,<3.12.0a0|>=3.5,<3.6.0a0']

Your python: python=3.10

Any advice on how to proceed? Thanks!

Your issue is with your python version.

My advice would be to install using miniconda.

  1. First, make a new conda environment with conda create -n scenicplus python=3.8
  2. Then, conda activate scenicplus
  3. conda install -c bioconda macs2 --yes
  4. Finally python3 -m pip install -e 'git+https://github.com/aertslab/scenicplus.git#egg=scenicplus'

You should be able to use it in this environment.

@li-xuyang28
Copy link

li-xuyang28 commented Apr 25, 2023 via email

@simozhou
Copy link

simozhou commented Apr 29, 2023

Is there a way to install MACS with versions of Python >= 3.10? It seems unreasonable to me that I have to downgrade version!!

@SeppeDeWinter
Copy link
Collaborator

@simozhou

We are continuously updating SCENIC+ (see development branch: https://github.com/aertslab/scenicplus/tree/development) and will soon (hopefully) update to python 3.10. This does take some time however, so please be patient.

Best,

Seppe

@Jokendo-collab
Copy link

```shell
sed -i 's/install_requires = \[f"numpy>={numpy_requires}",\]/install_requires = \[f"numpy{numpy_requires}",\]/' setup.py

I created a conda env and used python setup.py install and it worked for me. Just adding this incase someone my need it

@ghuls
Copy link
Member

ghuls commented Jun 20, 2023

MACS2 released v2.2.8, which fixes this installation issue:
https://pypi.org/project/MACS2/

This should work again:

pip install MACS2

@ghuls ghuls closed this as completed Jun 20, 2023
@GeneVector5
Copy link

GeneVector5 commented Jul 19, 2023

conda create --name scenicplus python=3.8
conda activate scenicplus

do does this mean we are restricted to python 3.8 when using scenic?

@GeneVector5
Copy link

Hi @Ajaingithub and @Umaarasu

I was able to reproduce the error. Below you can find a quick patch, however I will try to update the code to using MACS3 instead.

1. Create conda environment

conda create --name scenicplus python=3.8
conda activate scenicplus

2. Patch and install MACS2

Download and unzip MACS2 source code

wget https://github.com/macs3-project/MACS/archive/refs/tags/v2.2.7.1.tar.gz -O MACS.tar.gz
tar -xvf MACS.tar.gz

Patch MACS2

cd MACS-2.2.7.1
sed -i 's/install_requires = \[f"numpy>={numpy_requires}",\]/install_requires = \[f"numpy{numpy_requires}",\]/' setup.py

Install MACS2

pip install -e .

3. Install SCENIC+

cd ..
git clone https://github.com/aertslab/scenicplus
cd scenicplus
pip install -e .

I hope this helps.

Best, Seppe

For Step 3. I got the following:

"sed -i 's/install_requires = [f"numpy>={numpy_requires}",]/install_requires = [f"numpy{numpy_requires}",]/' setup.py

sed: 1: "setup.py": unterminated substitute pattern
"

What does the unterminated substitute pattern mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests