agshumate / Liftoff

An accurate GFF3/GTF lift over pipeline
GNU General Public License v3.0
433 stars 53 forks source link

Installation with conda and pip fails #145

Open jcchacond opened 1 year ago

jcchacond commented 1 year ago

Dear Alaina,

I've been trying to set up the latest version of liftoff in a MacBook (M1) and a linux-based HPC following all your instructions. Both conda and pip liftoff installation fail.

conda installation

conda install -c bioconda liftoff conda v23.1.0 in both cases

on the cluster

Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                             

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.17=0
  - feature:|@/linux-64::__glibc==2.17=0

Your installed version is: 2.17

on Mac

Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

I have also tried creating a conda environment exclusively for this as suggested in other issues, and it doesn't solve the problem.

pip installation

pip install Liftoff

both on the cluster and MacBook (pip v22.3.1 in cluster and pip 23.0.1 in Mac)

Collecting pysam==0.16.0.1
  Using cached pysam-0.16.0.1.tar.gz (3.6 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [81 lines of output]
.
.
.
 error in pysam setup command: use_2to3 is invalid.
      # pysam: htslib configure options: --enable-libcurl
      # pysam: htslib_config LIBHTS_OBJS=kfunc.o knetfile.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o header.o hfile.o hfile_net.o hts.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o region.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/string_alloc.o hfile_libcurl.o hfile_gcs.o hfile_s3.o hfile_s3_write.o
      # pysam: htslib_config LIBS=-ldeflate -llzma -lbz2 -lz -lm -lcurl -lcrypto
      # pysam: htslib_config PLATFORM=default
      # pysam: config_option: ENABLE_GCS=1
      # pysam: config_option: ENABLE_PLUGINS=0
      # pysam: config_option: ENABLE_S3=1
      # pysam: config_option: HAVE_COMMONCRYPTO=0
      # pysam: config_option: HAVE_HMAC=1
      # pysam: config_option: HAVE_LIBBZ2=1
      # pysam: config_option: HAVE_LIBCURL=1
      # pysam: config_option: HAVE_LIBDEFLATE=1
      # pysam: config_option: HAVE_LIBLZMA=1
      # pysam: config_option: HAVE_MMAP=1
      [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.

I'd appreciate any help with solving this. I'm happy to provide more information.

Thank you in advance, Camilo

Yutang-ETH commented 1 year ago

Hi Camilo,

Just to let you know, I was installing liftoff using conda and pip just now, but unfortunately both failed as you descried. Then I followed the instruction to install from source, it worked.

Best wishes, Yutang

wrengs commented 5 months ago

Dear Camilo and Yutang,

I experienced similar problems where installation through conda failed and installation using pip resulted in an error. Also for me, compiling from source resulted in an error, likely due to the preinstalled python rights (no sudo or writing rights to certain drives).

Hence, I used a workaround which might help you. 1) create conda environment with python 3.10

conda create -n liftoff python=3.10
conda activate liftoff

2) check whether the newly installed python is used and located somewhere you have rights to write

which python
/home/conda/envs/liftoff/bin/python

3) run installation python setup.py install 4) check if you can invoke liftoff

which liftoff
/home/conda/envs/liftoff/bin/liftoff

liftoff -h brought up help page

Please note that I haven't yet tried whether it actually works with the test data.

Cheers, Willem