shenwanxiang / bidd-aggmap

Jigsaw-like AggMap: A Robust and Explainable Multi-Channel Omics Deep Learning Tool
https://bidd-aggmap.readthedocs.io/en/latest/
GNU General Public License v3.0
34 stars 5 forks source link

Error of 'pip install -r requirements.txt' #10

Closed computbiol closed 2 years ago

computbiol commented 2 years ago
Collecting lapjv==1.3.1
  Downloading lapjv-1.3.1.tar.gz (6.6 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/moonswing/anaconda3/envs/aggmap/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e9m58w4c/lapjv_3d5d8d9aecf6488b96d92e81a7f82f69/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e9m58w4c/lapjv_3d5d8d9aecf6488b96d92e81a7f82f69/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-f09t2kp3
         cwd: /tmp/pip-install-e9m58w4c/lapjv_3d5d8d9aecf6488b96d92e81a7f82f69/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-e9m58w4c/lapjv_3d5d8d9aecf6488b96d92e81a7f82f69/setup.py", line 3, in <module>
        import numpy
    ModuleNotFoundError: No module named 'numpy'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/98/75/d64ba8523db4168646a8f8d74f104c4eaea820ad0464a6b41ff1e692840f/lapjv-1.3.1.tar.gz#sha256=e95d8b70e56e1c19509d92138660e53a19024c81170bebd40b075d9a93d3425d (from https://pypi.org/simple/lapjv/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement lapjv==1.3.1 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2.0, 1.3.0, 1.3.1, 1.3.10, 1.3.11, 1.3.12, 1.3.13, 1.3.14)
ERROR: No matching distribution found for lapjv==1.3.1
shenwanxiang commented 2 years ago

thanks for this issue, please try:

conda create -n aggmap python=3.7

# clone repo. and install requirements
git clone https://github.com/shenwanxiang/bidd-aggmap.git
cd bidd-aggmap
conda activate aggmap
pip install -r requirements.txt --user
pip install numpy -U
computbiol commented 2 years ago

Thanks a lot, I used the python3.8. I will try the python3.7.

On Mar 17, 2022, at 11:32, Charleshen @.***> wrote:

thanks for this issue, are you using python3+ in your aggmap env.?

— Reply to this email directly, view it on GitHub https://github.com/shenwanxiang/bidd-aggmap/issues/10#issuecomment-1070219528, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVYE5CB2X5JE6P5XYH2Y63VAKRVNANCNFSM5Q3GN3SQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

computbiol commented 2 years ago

Thanks a lot, I used the python3.8. I will try the python3.7. On Mar 17, 2022, at 11:32, Charleshen @.***> wrote: thanks for this issue, are you using python3+ in your aggmap env.? — Reply to this email directly, view it on GitHub <#10 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVYE5CB2X5JE6P5XYH2Y63VAKRVNANCNFSM5Q3GN3SQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

thanks for this issue, please try:

conda create -n aggmap python=3.7

# clone repo. and install requirements
git clone https://github.com/shenwanxiang/bidd-aggmap.git
cd bidd-aggmap
conda activate aggmap
pip install -r requirements.txt --user
pip install numpy -U

Hello, I still can't deploy the environment correctly using python3.7:

Building wheels for collected packages: lapjv
  Building wheel for lapjv (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ls/Programs/miniconda3/envs/aggmap/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-mh8pged5
       cwd: /tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/
  Complete output (25 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'lapjv' extension
  creating build
  creating build/temp.linux-x86_64-3.7
  gcc -pthread -B /home/ls/Programs/miniconda3/envs/aggmap/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ls/Programs/miniconda3/envs/aggmap/lib/python3.7/site-packages/numpy/core/include -I/home/ls/Programs/miniconda3/envs/aggmap/include/python3.7m -c python.cc -o build/temp.linux-x86_64-3.7/python.o -fopenmp -std=c++17 -march=native -ftree-vectorize
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from python.cc:7:0:
  lap.h: In function ‘std::tuple<cost, cost, idx, idx> find_umins(idx, idx, const cost*, const cost*)’:
  lap.h:215:6: error: expected ‘(’ before ‘constexpr’
     if constexpr(avx2) {
        ^
  lap.h:217:5: error: ‘else’ without a previous ‘if’
     } else {
       ^
  python.cc: At global scope:
  python.cc:9:41: error: use of deleted function ‘SIMDFlags::SIMDFlags(SIMDFlags&&)’
   static SIMDFlags simd_flags = SIMDFlags();
                                           ^
  In file included from python.cc:6:0:
  cpuid.h:12:3: note: declared here
     SIMDFlags(SIMDFlags &&) = delete;
     ^
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for lapjv
  Running setup.py clean for lapjv
Failed to build lapjv
Installing collected packages: numpy, lapjv, colorlog
  WARNING: The scripts f2py, f2py3 and f2py3.7 are installed in '/home/ls/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Running setup.py install for lapjv ... error
    ERROR: Command errored out with exit status 1:
     command: /home/ls/Programs/miniconda3/envs/aggmap/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6bl43kps/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ls/.local/include/python3.7m/lapjv
         cwd: /tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/
    Complete output (25 lines):
    running install
    running build
    running build_ext
    building 'lapjv' extension
    creating build
    creating build/temp.linux-x86_64-3.7
    gcc -pthread -B /home/ls/Programs/miniconda3/envs/aggmap/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/.eggs/numpy-1.21.5-py3.7-linux-x86_64.egg/numpy/core/include -I/home/ls/Programs/miniconda3/envs/aggmap/include/python3.7m -c python.cc -o build/temp.linux-x86_64-3.7/python.o -fopenmp -std=c++17 -march=native -ftree-vectorize
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from python.cc:7:0:
    lap.h: In function ‘std::tuple<cost, cost, idx, idx> find_umins(idx, idx, const cost*, const cost*)’:
    lap.h:215:6: error: expected ‘(’ before ‘constexpr’
       if constexpr(avx2) {
          ^
    lap.h:217:5: error: ‘else’ without a previous ‘if’
       } else {
         ^
    python.cc: At global scope:
    python.cc:9:41: error: use of deleted function ‘SIMDFlags::SIMDFlags(SIMDFlags&&)’
     static SIMDFlags simd_flags = SIMDFlags();
                                             ^
    In file included from python.cc:6:0:
    cpuid.h:12:3: note: declared here
       SIMDFlags(SIMDFlags &&) = delete;
       ^
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ls/Programs/miniconda3/envs/aggmap/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9nt1122t/lapjv_87f2557c46cb4ff19d44c185e64a75bb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6bl43kps/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ls/.local/include/python3.7m/lapjv Check the logs for full command output.
shenwanxiang commented 2 years ago

Hi you may try the following commands if you're using Ubuntu system:

sudo apt-get install python3-dev
sudo apt-get install gcc
computbiol commented 2 years ago

Hi you may try the following commands if you're using Ubuntu system:

sudo apt-get install python3-dev
sudo apt-get install gcc

Thanks. I tried above but it still failed. I think there are version incompatibilities of some packages. When I adjusted it, it worked.