-
Notifications
You must be signed in to change notification settings - Fork 283
pip install pysam fails with Python 3.8.0 #860
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
Comments
Having the exactly same issue on a fresh Ubuntu 19.04 with python 3.8 installed from source |
What version of Cython are you using? This appears to be cython/cython#2938 and it seems (PR cython/cython#2971) you will need at least cython 0.29.9. |
Thanks for the suggestions, @jmarshall! I just installed Cython 0.29.14 via In a way, it looks like they were solving the same issue in PR cython/cython#2971, but it does not seem like having the fixed Cython verson installed helps with compiling pysam. |
The usual reason for that is that your pysam build is using the bundled pre-built libchtslib.c etc (which were likely built with an earlier Cython) rather than re-running Cython. It appears that @myourshaw's build is rebuilding these from libchtslib.pyx etc:
Are you certain yours is as well? |
Yes, confirming that
Running it with no Cython installed fails at during compilation of |
I, too, have Cython 0.29.14 installed. |
I see the same error. |
¯\_(ツ)_/¯ Works for me with Python 3.8.0 (3.8.0-3~18.04 from bionic-updates) and Cython 0.29.14, building pysam from within a tarball with There were some false starts with this |
I had exactly the same issue when I was running the command |
I installed Python 3.8.0 from source a few weeks ago on my Ubuntu 19.04. Here is the version information from
@jmarshall did you also try to pip install? I still need to check if the tarball works for me |
/home/myourshaw/.local/include/python3.8/patchlevel.h contains
|
Still have the same issue with Python 3.8.1. |
Anyone solved the problem. 3.8.0 failed, and upgraded to python 3.8.1 still having the same problem. It is a pain in the neck. I am going to try to change the source code and see that will fix the problem. |
Looks the latest version of pysam fixed this problem. I used git clone of this project and this problem was gone. I looked at the problem location it was a simple #define directive problem. Someone should close this issue. |
@kemin711: What exact |
I did not fix the problem. The crashed line is a C directive #define the function with one extra argument |
I don't know the exact fix. But it should be some minor mismatch of function signature. |
Yes. That's |
I have similarly observed that if I do |
Of further note: doing However, all is not well for me even after "successfully" installing from source...
I guess that installing this way doesn't actually work! |
This is caused by some .c files in pysam 0.15.3 which were made by Cython 0.29.10. It can be fixed by regenerating them with Cython 0.29.12 or later. I successfully used Cython 0.29.14 together with this addition to setup.cfg:
|
Installing with As @ExplodingCabbage says, the following works. I guess PyPI needs to be updated.
|
Inspired by @pm67nz's post, I tried simply rebuilding with a newer version of Cython (and with my fix from #874) and uploading to PyPI, and everything worked. You can install my version with:
and you'll be good to go. @AndreasHeger, if you can spare the time to simply:
then I think everything should be fixed for the official pysam package. |
This is the version @pm67nz indicates is needed for creating a build from source in pysam-developers#860 (comment), so I figure we might as well enforce it everywhere?
Indeed. The question for the maintainers is whether to make a point release just with regenerated Cython output files, or to do that as part of a larger release updating pysam to htslib/samtools/bcftools 1.10.x. |
I got it fixed.
Kemin Zhou 858 771-3269
On Tuesday, January 14, 2020, 06:14:07 AM PST, John Marshall <[email protected]> wrote:
Indeed. The question for the maintainers is whether to make a point release just with regenerated Cython output files, or to do that as part of a larger release updating pysam to htslib/samtools/bcftools 1.10.x.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thinking about this further, it probably is worthwhile making a point release update just regenerating the Cython outputs. There is a soversion bump between htslib 1.9 and 1.10 and some datatype size changes. So when pysam is updated to include the 1.10.x htslib/samtools/bcftools it would be beneficial to update pysam/* as well to use the htslib 1.10 facilities, including using some new functions. So pysam would then require htslib 1.10. Hence it would be good to have a final htslib-1.9-using pysam release that works nicely with Python 3.8. |
Makes sense. I have merged some outstanding pull requests and will build a release before moving on to htslib-1.10. |
@AndreasHeger: Where pysam-0.15.3.tar.gz contained libc*.c files that were generated by a version of Cython that turned out to be a little bit too old, pysam-0.15.4.tar.gz (i.e., the source tarball listed at https://pypi.org/project/pysam/#files) does not contain any Cython-generated *.c files at all. Is this an intended change? |
Regardless of the point above by @jmarshall (which Andreas may yet want to answer), I can confirm that I can now do |
Thanks, I will close. |
I get the following error when trying to install pysam with pip in Python 3.8.0 ( I also posted this on the user group):
The text was updated successfully, but these errors were encountered: