WeiliWw / VirHostMatcher-Net

VirHostMatcher-Net: A network-based computational tool for predicting virus-host interactions.
18 stars 1 forks source link

Installation error #27

Open TKsh6 opened 1 year ago

TKsh6 commented 1 year ago

When I ran this command, python setup.py install --install-platlib=./src/ I got this error,

/beegfs/home/syl/anaconda3/envs/virhost/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/beegfs/home/syl/anaconda3/envs/virhost/lib/python3.11/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
TEST FAILED: ./src/ does NOT support .pth files
bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    ./src/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.
zip_safe flag not set; analyzing archive contents...
__pycache__.tools.cpython-311: module references __file__

Could you please help me to solve this? yours,

WoCer2019 commented 1 year ago

+1

leihuaxin commented 1 year ago

Hi,

You can try to use conda installation:

conda install -c hcc virhostmatcher-net

or follow the README, and install virhostmatcher-net with conda , then copy the scr/tool* files obtained from conda installation to the path your\path\VirHostMatcher-Net/src/

it works for me. you can have a try probably.

sanzezixi commented 1 year ago

export PYTHONPATH=./src:$PYTHONPATH

alephreish commented 12 months ago

The following conda environment definition seems to work:

channels:
 - conda-forge
 - bioconda
 - hcc
dependencies:
 - numpy=1.19.5
 - pandas=1.4.4
 - biopython=1.81
 - virhostmatcher-net=0.0.2021.08.29

It's important to pin the numpy version not to run into AttributeError: module 'numpy' has no attribute 'float'..