biocore-ntnu / epic2

Ultraperformant reimplementation of SICER
https://doi.org/10.1093/bioinformatics/btz232
MIT License
55 stars 9 forks source link

SyntaxError in epic2-0.0.47 #45

Open dconnolly1 opened 3 years ago

dconnolly1 commented 3 years ago

Thanks for the update to this great tool! Unfortunately, I've been having trouble installing/using the newest version of epic2. I tried installing using "pip install epic2" and the installation seemed to work. However when I go to use it, it throws a confusing syntax error (which I've copied below), even if I'm just calling "epic2 -h".

Interestingly, if I install a previous version (using pip install epic2==0.0.39), it seems to work. Any thoughts on this? I don't know what to make of the syntax error, perhaps it's a Python 2/Python 3 issue? Thanks for your help!

I get the following output when I run epic2 -h after having installed the most recent version:

Traceback (most recent call last): File "/home/ubuntu/.local/bin/epic2", line 10, in from epic2.main import _main File "/home/ubuntu/.local/lib/python2.7/site-packages/epic2/main.py", line 5, in from epic2.src.reads_to_bins import files_to_bin_counts File "epic2/src/reads_to_bins.pyx", line 19, in init epic2.src.reads_to_bins File "/home/ubuntu/.local/lib/python2.7/site-packages/epic2/src/remove_out_of_bounds_bins.py", line 7 print("Chromosome {} found in file, but not in the chromsizes dict for the genome.".format(chromosome), file=sys.stderr) ^ SyntaxError: invalid syntax

endrebak commented 3 years ago

I'm on it :) Thanks for reporting 🙏

endrebak commented 3 years ago

I think the error happens because you are using Python 2. Could you try it on 3?

dconnolly1 commented 3 years ago

Yes, you seem to be right! Although I'm using Python 3 (more specifically, python -V tells me the python command is resolving to Python 3.6.9), it seems like epic2 was installed using Python 2.7 when I installed with pip install epic2. Makes sense, I also have 2.7 on this machine.

I tried re-installing using pip3 install epic2 and now I'm able to call epic2 -h with no issues. Thank you!