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

numpy not installed as a requirement #2

Open
james-vincent opened this issue Jun 10, 2022 · 8 comments
Open

numpy not installed as a requirement #2

james-vincent opened this issue Jun 10, 2022 · 8 comments

Comments

@james-vincent
Copy link

pip install of scallele does not install numpy in python:

Traceback (most recent call last): File "/programs/x86_64-linux//scallele/0.0.9.1/bin/scAllele", line 5, in <module> from scAllele.gqv import main File "/programs/x86_64-linux/scallele/0.0.9.1/lib/python3.10/site-packages/scAllele/gqv.py", line 14, in <module> from . import gqv_utils File "/programs/x86_64-linux/scallele/0.0.9.1/lib/python3.10/site-packages/scAllele/gqv_utils.py", line 5, in <module> import numpy as np ; np.seterr(all = "ignore") ModuleNotFoundError: No module named 'numpy'

Installation according to instructions:
./python -m pip install -i https://test.pypi.org/simple/ scAllele

./pip list | grep scAllele
scAllele 0.0.8

@giovanniquinones
Copy link
Contributor

Hi James,
It seems you have two versions of scAllele 0.0.9.1 and 0.0.8 ?
Also, numpy should be installed together with scAllele (if you didn't already have one working version).
Please try to uninstall all scAllele versions and try re-installing again.

@james-vincent
Copy link
Author

I only have 0.0.8 installed. I labelled the directory 0.0.9.1 because that's what I expected to install when I used this:
./python -m pip install -i https://test.pypi.org/simple/ scAllele

Even though 0.0.9.1 is listed at pypi and in the github repo, it still only installs 0.0.8.

If scAllele requires numpy (and other packages) then it should be a requirement with the pip install. If not that then it should be listed in the install documentation.

@james-vincent
Copy link
Author

scipy is also required but not installed by pip.

@giovanniquinones
Copy link
Contributor

Both scipy and numpy are listed as requirements in the setup.
You need to uninstall scAllele pip uninstall scAllele because it won't install a new version if you already have scAllele.
Also, you don't need to create a new directory. pip will install directly to your python PATH.

@james-vincent
Copy link
Author

After specifying version 0.0.9.1 with the pip install I now get unsatisfiable errors:

Downloading https://test-files.pythonhosted.org/packages/b5/04/f9fcd7b453139cab2d65f71750565b79ac389a73bf3b5fd6c731a6f1e81f/scAllele-0.0.9.1-py3-none-any.whl (45 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.7/45.7 kB 29.9 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement biopython (from scallele) (from versions: none)
ERROR: No matching distribution found for biopython

I am using python 3.7.12:
python --version
Python 3.7.12

@giovanniquinones
Copy link
Contributor

I didn't know. but the version that gets downloaded from test pipy is 0.0.8. This is a bug on their side because version 0.0.9.1 is clearly present and labeled as the latest one. I will try to resolve this as soon as possible.
I included a debug section in the main README. Please follow those steps and let me know if you still have installation issues.
Best,

@james-vincent
Copy link
Author

Installation of requirements.txt using pip directly fails because of missing libbzip2

`Collecting pysam>=0.9.1
Downloading pysam-0.19.1.tar.gz (3.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 302.3 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [139 lines of output]
# pysam: no cython available - using pre-compiled C
# pysam: htslib mode is shared
# pysam: HTSLIB_CONFIGURE_OPTIONS=None
# pysam: (sysconfig) CC=gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/
# pysam: (sysconfig) CFLAGS=-Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
# pysam: (sysconfig) LDFLAGS=-L/programs/x86_64-linux/scallele/0.0.9.1/lib -Wl,-rpath=/programs/x86_64-linux/scallele/0.0.9.1/lib -Wl,--no-as-needed -Wl,--sysroot=/
checking for gcc... gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/ accepts -g... yes
checking for gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/ option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking for C compiler warning flags... unknown
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking shared library type for unknown-Linux... plain .so
checking whether the compiler accepts -fvisibility=hidden... yes
checking how to run the C preprocessor... gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/ -E
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for gmtime_r... yes
checking for fsync... yes
checking for drand48... yes
checking for srand48_deterministic... no
checking whether fdatasync is declared... yes
checking for fdatasync... yes
checking for library containing log... -lm
checking for zlib.h... yes
checking for inflate in -lz... yes
checking for library containing recv... none required
checking for bzlib.h... no
checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
configure: error: libbzip2 development files not found

  The CRAM format may use bzip2 compression, which is implemented in HTSlib
  by using compression routines from libbzip2 <http://www.bzip.org/>.
  
  Building HTSlib requires libbzip2 development files to be installed on the
  build machine; you may need to ensure a package such as libbz2-dev (on Debian
  or Ubuntu Linux) or bzip2-devel (on RPM-based Linux distributions or Cygwin)
  is installed.
  
  Either configure with --disable-bz2 (which will make some CRAM files
  produced elsewhere unreadable) or resolve this error to build HTSlib.
  checking for gcc... gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/ accepts -g... yes
  checking for gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/ option to accept ISO C89... none needed
  checking for ranlib... ranlib
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for C compiler warning flags... unknown
  checking for pkg-config... /usr/bin/pkg-config
  checking pkg-config is at least version 0.9.0... yes
  checking for special C compiler options needed for large files... no
  checking for _FILE_OFFSET_BITS value needed for large files... no
  checking shared library type for unknown-Linux... plain .so
  checking whether the compiler accepts -fvisibility=hidden... yes
  checking how to run the C preprocessor... gcc -pthread -B /programs/x86_64-linux/scallele/0.0.9.1/compiler_compat -Wl,--sysroot=/ -E
  checking for egrep... /usr/bin/grep -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for stdlib.h... (cached) yes
  checking for unistd.h... (cached) yes
  checking for sys/param.h... yes
  checking for getpagesize... yes
  checking for working mmap... yes
  checking for gmtime_r... yes
  checking for fsync... yes
  checking for drand48... yes
  checking for srand48_deterministic... no
  checking whether fdatasync is declared... yes
  checking for fdatasync... yes
  checking for library containing log... -lm
  checking for zlib.h... yes
  checking for inflate in -lz... yes
  checking for library containing recv... none required
  checking for bzlib.h... no
  checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
  configure: error: libbzip2 development files not found
  
  The CRAM format may use bzip2 compression, which is implemented in HTSlib
  by using compression routines from libbzip2 <http://www.bzip.org/>.
  
  Building HTSlib requires libbzip2 development files to be installed on the
  build machine; you may need to ensure a package such as libbz2-dev (on Debian
  or Ubuntu Linux) or bzip2-devel (on RPM-based Linux distributions or Cygwin)
  is installed.
  
  Either configure with --disable-bz2 (which will make some CRAM files
  produced elsewhere unreadable) or resolve this error to build HTSlib.
  Makefile:122: htscodecs.mk: No such file or directory
  config.mk:2: *** Resolve configure error first.  Stop.
  Traceback (most recent call last):
    File "<string>", line 36, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-mx2r8im4/pysam_76cff401f4ac4ae4959ef1941563cbce/setup.py", line 375, in <module>
      htslib_make_options = run_make_print_config()
    File "/tmp/pip-install-mx2r8im4/pysam_76cff401f4ac4ae4959ef1941563cbce/setup.py", line 74, in run_make_print_config
      stdout = subprocess.check_output(["make", "-s", "print-config"])
    File "/programs/x86_64-linux/scallele/0.0.9.1/lib/python3.7/subprocess.py", line 411, in check_output
      **kwargs).stdout
    File "/programs/x86_64-linux/scallele/0.0.9.1/lib/python3.7/subprocess.py", line 512, in run
      output=stdout, stderr=stderr)
  subprocess.CalledProcessError: Command '['make', '-s', 'print-config']' returned non-zero exit status 2.
  # pysam: htslib configure options: None
  [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`

@james-vincent
Copy link
Author

After installing libdeflate and bzip2 get an error in requirements.txt not being able to find satisfactory version.

Could you perhaps post the exact environment you are using? I am starting with a conda install of python 3.7.12.

$ ./pip install -i https://test.pypi.org/simple/ scAllele==0.0.9.1 Looking in indexes: https://test.pypi.org/simple/, https://pypi.ngc.nvidia.com Collecting scAllele==0.0.9.1 Downloading https://test-files.pythonhosted.org/packages/b5/04/f9fcd7b453139cab2d65f71750565b79ac389a73bf3b5fd6c731a6f1e81f/scAllele-0.0.9.1-py3-none-any.whl (45 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.7/45.7 kB 4.8 MB/s eta 0:00:00 ERROR: Could not find a version that satisfies the requirement networkx>=2.4 (from scallele) (from versions: 2.0.dev20160901144005) ERROR: No matching distribution found for networkx>=2.4 (base) sbgrid@sbgrid-build-c7 [] /programs/x86_64-linux/scallele/0.0.9.1/bin $ ./python --version Python 3.7.12

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

No branches or pull requests

2 participants