Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to pip install pysam on Windows #1137

Open
dino945 opened this issue Oct 20, 2022 · 11 comments
Open

Unable to pip install pysam on Windows #1137

dino945 opened this issue Oct 20, 2022 · 11 comments

Comments

@dino945
Copy link

dino945 commented Oct 20, 2022

Hi, I try to do "pip install pysam" in Windows 10 using python 3.7.9.
Here is the error message return:
image

Anyone that has clue on this error?

@aryarm
Copy link

aryarm commented Nov 8, 2022

yes, I had issues like these back when v0.19.1 was released b/c wheels hadn't been uploaded for that release

unfortunately, I'm now getting different installation issues with v0.20.0 because an sdist hasn't been uploaded for that release

is there any chance the pysam team can upload an sdist for v0.20.0?

@AndreasHeger
Copy link
Contributor

Ah, will check. I managed to time the last pysam release with a pypi downtime window.

@AndreasHeger
Copy link
Contributor

@aryarm, I have uploaded the tar-ball. Apologies for the over-sight.
@dino945 , sorry I am not familiar with windows. Have you tried wsl?

@aryarm
Copy link

aryarm commented Nov 8, 2022

thank you so much, @AndreasHeger !

@pnrobinson
Copy link

Hi @AndreasHeger -- we are getting the following error on an M1 Mac

pip install pysam
(...)
 File "/private/var/folders/6q/nqfsh3cs775bb1rnrs7n_c_htypxv6/T/pip-install-i1h3zu3z/pysam_9d9c611018f741b7a603d298a813e761/cy_build.py", line 69, in build_extension
          relative_module_path = ext.name.replace(".", os.sep) + get_config_vars()["SO"]
                                                                 ~~~~~~~~~~~~~~~~~^^^^^^
      KeyError: 'SO'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pysam

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Any ideas how to fix this?

@jmarshall
Copy link
Member

jmarshall commented Mar 16, 2023

@pnrobinson: That is #1154, which has already been fixed on the master branch.

@pnrobinson
Copy link

@jmarshall thanks -- so does this mean I need to install from a local clone of the master branch (pip install still does not work)?

@jmarshall
Copy link
Member

@pnrobinson: At present you would need to install from a Git repository. A new release which will contain this fix is imminent and will of course be installable via pip.

@snowformatics
Copy link

Hi,

I am having the same problem as @dino945 on Windows 10 and Python 3.7. is it possible to install pysam on Windows?

Thanks

@yzliu01
Copy link

yzliu01 commented Apr 5, 2023

Same problem as here on Win10 Python 3.10 with pip 23.0.1. It's very strange.
Cannot install using conda either, even this package is there. It seems to be the same issue as I had for vcfpy, which it could be only installed using git clone file.

conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
conda install pysam
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - pysam

Current channels:

  - https://conda.anaconda.org/bioconda/win-64
  - https://conda.anaconda.org/bioconda/noarch
  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch
  - https://conda.anaconda.org/r/win-64
  - https://conda.anaconda.org/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

also for

conda install -c bioconda pysam
conda install -c "bioconda/label/cf201901" pysam
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - pysam

Current channels:

  - https://conda.anaconda.org/bioconda/win-64
  - https://conda.anaconda.org/bioconda/noarch
  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch
  - https://conda.anaconda.org/r/win-64
  - https://conda.anaconda.org/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

@jmarshall jmarshall changed the title Unable to pip install pysam Unable to pip install pysam on Windows Apr 5, 2023
@teepean
Copy link

teepean commented Jun 5, 2023

Pysam would require some major patching to start working on Windows. There is an old PR that used to work but I haven't been able to compile any recent versions.

#964

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

No branches or pull requests

8 participants