PoonLab / OpenRDP

An open-source re-implementation of the RDP4 recombination detection program
GNU General Public License v3.0
45 stars 9 forks source link

Unable to install #98

Open AbhishakeL opened 4 days ago

AbhishakeL commented 4 days ago

I have been using this package for more than a year now. However, I decided to install it in a different machine but I absolutely am unable to do so. I do have sudo access so I did sudo python3 setup.py install but it doesn't complete. The last part of the error message is:

Installed /usr/local/lib/python3.8/dist-packages/OpenRDP-0.1.0-py3.8.egg
Processing dependencies for OpenRDP==0.1.0
Searching for scipy>=1.5.0
Reading https://pypi.org/simple/scipy/
Downloading https://files.pythonhosted.org/packages/4e/e5/0230da034a2e1b1feb32621d7cd57c59484091d6dccc9e6b855b0d309fc9/scipy-1.14.0.tar.gz#sha256=b5923f48cb840380f9854339176ef21763118a7300a88203ccd0bdd26e58527b
Best match: scipy 1.14.0
Processing scipy-1.14.0.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-lu75zj_m/scipy-1.14.0.tar.gz

But pip install --upgrade scipy already satisfies

Requirement already satisfied: scipy in /home/bio2info/miniforge3/envs/CorEv_dev1/lib/python3.12/site-packages (1.14.0)
Requirement already satisfied: numpy<2.3,>=1.23.5 in /home/bio2info/miniforge3/envs/CorEv_dev1/lib/python3.12/site-packages (from scipy) (2.0.0)

As an alternative I did pip install -e . which did successfully install.

Obtaining file:///home/bio2info/OpenRDP
  Preparing metadata (setup.py) ... done
Requirement already satisfied: scipy>=1.5.0 in /home/bio2info/miniforge3/envs/CorEv_dev1/lib/python3.12/site-packages (from OpenRDP==0.1.0) (1.14.0)
Requirement already satisfied: numpy>=1.17.4 in /home/bio2info/miniforge3/envs/CorEv_dev1/lib/python3.12/site-packages (from OpenRDP==0.1.0) (2.0.0)
Requirement already satisfied: h5py==3.8.0 in /home/bio2info/miniforge3/envs/CorEv_dev1/lib/python3.12/site-packages (from OpenRDP==0.1.0) (3.8.0)
Installing collected packages: OpenRDP
  Attempting uninstall: OpenRDP
    Found existing installation: OpenRDP 0.1.0
    Uninstalling OpenRDP-0.1.0:
      Successfully uninstalled OpenRDP-0.1.0
  Running setup.py develop for OpenRDP
Successfully installed OpenRDP-0.1.0

But when I run openrdp -h after that it goes back to same error.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 792, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipyTraceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requiremen 1.3.3 (/usr/lib/python3/dist-packages), Requirement.parse('scipy>=1.5.0'), {'OpenRDP'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/openrdp", line 4, in <module>
    __import__('pkg_resources').run_script('OpenRDP==0.1.0', 'openrdp')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 586, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'scipy>=1.5.0' distribution was not found and is required by OpenRDP

Am I missing something obvious? Also thanks in advance for any help regarding this.

GopiGugan commented 12 hours ago

Hi @AbhishakeL, can you confirm whether you ran sudo pip install -e . or pip install -e .? It looks like openrdp was not installed in your conda environment

AbhishakeL commented 9 hours ago

I ran pip install -e . However I also did try sudo python3 setup.py install. While replying I again ran sudo python3 setup.py . This time I got the following message.

running install
running bdist_egg
running egg_info
writing OpenRDP.egg-info/PKG-INFO
writing dependency_links to OpenRDP.egg-info/dependency_links.txt
writing requirements to OpenRDP.egg-info/requires.txt
writing top-level names to OpenRDP.egg-info/top_level.txt
reading manifest file 'OpenRDP.egg-info/SOURCES.txt'
writing manifest file 'OpenRDP.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/common.py -> build/bdist.linux-x86_64/egg/openrdp
creating build/bdist.linux-x86_64/egg/openrdp/bin
creating build/bdist.linux-x86_64/egg/openrdp/bin/GENECONV
copying build/lib/openrdp/bin/GENECONV/geneconv.macOS -> build/bdist.linux-x86_64/egg/openrdp/bin/GENECONV
copying build/lib/openrdp/bin/GENECONV/windows_geneconv.exe -> build/bdist.linux-x86_64/egg/openrdp/bin/GENECONV
copying build/lib/openrdp/bin/GENECONV/LICENSE.md -> build/bdist.linux-x86_64/egg/openrdp/bin/GENECONV
copying build/lib/openrdp/bin/GENECONV/geneconv.Unix -> build/bdist.linux-x86_64/egg/openrdp/bin/GENECONV
creating build/bdist.linux-x86_64/egg/openrdp/bin/3Seq
copying build/lib/openrdp/bin/3Seq/3seq.macOS -> build/bdist.linux-x86_64/egg/openrdp/bin/3Seq
copying build/lib/openrdp/bin/3Seq/windows_3seq.exe -> build/bdist.linux-x86_64/egg/openrdp/bin/3Seq
copying build/lib/openrdp/bin/3Seq/LICENSE.md -> build/bdist.linux-x86_64/egg/openrdp/bin/3Seq
copying build/lib/openrdp/bin/3Seq/3seq.Unix -> build/bdist.linux-x86_64/egg/openrdp/bin/3Seq
copying build/lib/openrdp/bin/3Seq/myPvalueTable -> build/bdist.linux-x86_64/egg/openrdp/bin/3Seq
copying build/lib/openrdp/bootscan.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/__init__.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/default.ini -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/threeseq.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/chimaera.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/geneconv.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/siscan.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/maxchi.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/preprocessing.py -> build/bdist.linux-x86_64/egg/openrdp
copying build/lib/openrdp/rdp.py -> build/bdist.linux-x86_64/egg/openrdp
byte-compiling build/bdist.linux-x86_64/egg/openrdp/common.py to common.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/bootscan.py to bootscan.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/threeseq.py to threeseq.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/chimaera.py to chimaera.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/geneconv.py to geneconv.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/siscan.py to siscan.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/maxchi.py to maxchi.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/preprocessing.py to preprocessing.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/openrdp/rdp.py to rdp.cpython-38.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.8/openrdp -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/openrdp to 755
copying OpenRDP.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying OpenRDP.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying OpenRDP.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying OpenRDP.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying OpenRDP.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying OpenRDP.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/OpenRDP-0.1.0-py3.8.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing OpenRDP-0.1.0-py3.8.egg
creating /usr/local/lib/python3.8/dist-packages/OpenRDP-0.1.0-py3.8.egg
Extracting OpenRDP-0.1.0-py3.8.egg to /usr/local/lib/python3.8/dist-packages
Removing OpenRDP 0.1.0 from easy-install.pth file
Adding OpenRDP 0.1.0 to easy-install.pth file
Installing openrdp script to /usr/local/bin

Installed /usr/local/lib/python3.8/dist-packages/OpenRDP-0.1.0-py3.8.egg
Processing dependencies for OpenRDP==0.1.0
error: numpy 1.17.4 is installed but numpy<1.27.0,>=1.19.5 is required by {'scipy'}

Following which I ran conda install numpy==1.19.5 which ended up with the following message

Retrieving notices: ...working... done
Channels:
 - conda-forge
 - bioconda
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: - warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package numpy-1.19.5-py36h2aa4a07_0 requires python >=3.6,<3.7.0a0, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ numpy 1.19.5  is installable with the potential options
│  ├─ numpy 1.19.5 would require
│  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  ├─ numpy 1.19.5 would require
│  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  ├─ numpy 1.19.5 would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  └─ numpy 1.19.5 would require
│     └─ python >=3.9,<3.10.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.12.* , which conflicts with any installable versions previously reported.

I might be putting in unnecessary information here, for which I am sorry.

ArtPoon commented 4 hours ago

Based on the error messages that you've posted, it looks like you have multiple Python environments on your system and it is getting confused about which Python and dependency locations to use when running OpenRDP. Is it possible to launch OpenRDP specifically using the conda environment in which you previously installed the dependencies, e.g., scipy?