wdecoster / NanoPlot

Plotting scripts for long read sequencing data
http://nanoplot.bioinf.be
MIT License
407 stars 48 forks source link

Installation Error NanoPlot #318

Closed StanAanhane closed 1 year ago

StanAanhane commented 1 year ago

Dear Wouter,

I hope this message finds you well.

During the installation of NanoPlot, and error occurred with the script. I'm not sure if this is an issue from my side, but this the error that occurred:

`(stanaanhane)` PS C:\Users\Synvolux\Documents\Stan Aanhane\Nanopore\Code For SNP calling> pip install nanoplot
Collecting nanoplot
  Using cached NanoPlot-1.41.0.tar.gz (31 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: biopython in c:\users\synvolux\documents\stan aanhane\nanopore\code for snp calling\stanaanhane\lib\site-packages (from nanoplot) (1.80)
Collecting pysam>0.10.0.0
  Using cached pysam-0.20.0.tar.gz (4.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      # pysam: no cython available - using pre-compiled C
      # pysam: htslib mode is shared
      # pysam: HTSLIB_CONFIGURE_OPTIONS=None
      '.' is not recognized as an internal or external command,
      operable program or batch file.
      '.' is not recognized as an internal or external command,
      operable program or batch file.
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Synvolux\AppData\Local\Temp\pip-install-je31svz1\pysam_c94c19a9a5824ce996cfd66c48fd93bd\setup.py", line 381, in <module>
          htslib_make_options = run_make_print_config()
        File "C:\Users\Synvolux\AppData\Local\Temp\pip-install-je31svz1\pysam_c94c19a9a5824ce996cfd66c48fd93bd\setup.py", line 79, in run_make_print_config
          stdout = subprocess.check_output(["make", "-s", "print-config"])
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 421, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 503, in run
          with Popen(*popenargs, **kwargs) as process:
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 971, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1440, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      # 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.`

Do you see whats wrong? Thank you in advance!

Best, Stan

wdecoster commented 1 year ago

This is a windows terminal right? Could you try WSL? Or do you have access to a Linux/mac device? Pysam cannot be installed on windows as far as I know.

StanAanhane commented 1 year ago

This is in visual code studio, on windows yes. I just checked and indeed Pysam can't be installed on windows, so thats my mistake. We are currently setting up the server for this script, which will run on Linux, but I currently don't have any access to it yet. But seeing the mistake, I think it will work on there on WSL. If I run into any problems with it then, I will contact you. Thank you for the fast reply!

wdecoster commented 1 year ago

It should work on WSL yes - please let me know if it doesn't :)

StanAanhane commented 1 year ago

I just checked, and it worked. Thanks. Maybe a stupid question, but for some reason, it gives a reportUndifinedVariable error in vc studio when I test it(NanoPlot is installed, and vc tests the script in bash terminal), but in the linux terminal (so not in vc studio) it does recognize the NanoPlot -h. Is there something I'm missing?

wdecoster commented 1 year ago

I'm not sure I understand :-)

StanAanhane commented 1 year ago

I found the issue. Its that the debug system does not recognise the variable. When i run it the script normally it works :)