Problems to run pysamstats

213 views
Skip to first unread message

joette18

unread,
Nov 15, 2017, 4:46:05 PM11/15/17
to Pysam User group
Hello,
I wanted to install and run pysamstats under my Ubuntu-System.
To install I used pip with following commands

sudo -H pip install pysam==0.11.2.2
sudo -H pip install pysamstats

I got no error or warning messages during the installation, but everytime I use the command
pysamstats --help

I get following error message;

Traceback (most recent call last):
  File "/usr/local/bin/pysamstats", line 10, in <module>
    import pysamstats
  File "/usr/local/lib/python2.7/dist-packages/pysamstats/__init__.py", line 8, in <module>
    from .pileup import *
  File "/usr/local/lib/python2.7/dist-packages/pysamstats/pileup.py", line 6, in <module>
    import pysamstats.opt as opt
  File "libcfaidx.pxd", line 51, in init pysamstats.opt (pysamstats/opt.c:34893)
AttributeError: 'module' object has no attribute 'PersistentFastqProxy'


I tried to uninstall pysamstats and pysam via pip uninstall and then reinstall both packages again. But this doesn't help either.

Can somebody help me?
 

Alistair Miles

unread,
Nov 15, 2017, 6:30:35 PM11/15/17
to pysam-us...@googlegroups.com
Hi there, 

I've seen this error where a version of pysam > 0.11 is installed. I see you did try to pin pysam to 0.11.2.2 in your install which is the right thing to do, however if you are installing system-wide I think you can sometimes run into cryptic situations where more than one version of pysam is installed, or where pysamstats is linking against a different version of the pysam from what you expect. My suggestion would be to run sudo pip uninstall pysam several times, then install pysam==0.11.2.2 and pysamstats into either a virtual environment or a conda environment, and see if that works.

Hth,
Alistair

--
You received this message because you are subscribed to the Google Groups "Pysam User group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pysam-user-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
Big Data Institute Building
Old Road Campus
Roosevelt Drive
Oxford
OX3 7LF
United Kingdom

joette18

unread,
Nov 22, 2017, 6:52:02 AM11/22/17
to Pysam User group
Hi Alistair,

thank you so much!! It wasn't even necessary to use virtual or conda environment. I just uninstalled pysamstats multiple times. And so I discovered that I had much more versions of pysamstats, as you supposed. Now it works. :) Thank you!

Alistair Miles

unread,
Nov 22, 2017, 8:11:55 AM11/22/17
to pysam-us...@googlegroups.com
No problem, glad you got it sorted, that's happened to me before and can be very confusing.

On Wed, Nov 22, 2017 at 11:52 AM, joette18 <pel...@web.de> wrote:
Hi Alistair,

thank you so much!! It wasn't even necessary to use virtual or conda environment. I just uninstalled pysamstats multiple times. And so I discovered that I had much more versions of pysamstats, as you supposed. Now it works. :) Thank you!

--
You received this message because you are subscribed to the Google Groups "Pysam User group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pysam-user-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages