snayfach / MicrobeCensus

MicrobeCensus estimates the average genome size of microbial communities from metagenomic data
http://genomebiology.com/2015/16/1/51
GNU General Public License v3.0
41 stars 16 forks source link

Pip install error from official 1.1.0 tarball #15

Closed boulund closed 6 years ago

boulund commented 6 years ago

Just created a clean conda environment with Python 3.6 and tried to install MicrobeCensus into it using pip, as instructed by the installation manual. Note that the conda environment is active when I tried the commands below, but I removed the bash prefix for brevity here.

I got this:

$ wget https://github.com/snayfach/MicrobeCensus/archive/v1.1.0.tar.gz -O MicrobeCensus-v1.1.0.tar.gz
$ pip install MicrobeCensus-v1.1.0.tar.gz
Processing ./MicrobeCensus-v1.1.0.tar.gz                                               
    Complete output from command python setup.py egg_info:                             
    Traceback (most recent call last):                                                 
      File "<string>", line 1, in <module>                                             
      File "/tmp/pip-gxty91hz-build/setup.py", line 12                                 
        mode = ((os.stat(fn).st_mode) | 0555) & 07777                                  
                                           ^                                           
    SyntaxError: invalid token                                                         

    ----------------------------------------                                           
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-gxty91hz-build/

I see the same thing trying to install from pypi, but then it downloads an older version:

$ pip install MicrobeCensus
Collecting MicrobeCensus                                                                             
  Downloading MicrobeCensus-1.0.7.tar.gz (22.0MB)                                                    
    100% |████████████████████████████████| 22.0MB 31.7MB/s                                          
    Complete output from command python setup.py egg_info:                                           
    Traceback (most recent call last):                                                               
      File "<string>", line 1, in <module>                                                           
      File "/tmp/pip-build-v02fdl_2/MicrobeCensus/setup.py", line 12                                 
        mode = ((os.stat(fn).st_mode) | 0555) & 07777                                                
                                           ^                                                         
    SyntaxError: invalid token                                                                       

    ----------------------------------------                                                         
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-v02fdl_2/MicrobeCensus/
boulund commented 6 years ago

Nevermind, I commented out the section in setup.py that tries to mess with the file permissions, now it appears to work just fine. At least I have an executable Python script in my path called run_microbe_census.py and it produces nice help output. I'll report back when I've tried running it for real later this week. I'll leave this here if someone else encounters the same issue.

For reference, I commented out the following lines in setup.py: https://github.com/snayfach/MicrobeCensus/blob/d91b46577def583b3ef2379fd5fca24619059f23/setup.py#L6-L14

boulund commented 6 years ago

Deleted everything again this morning and started over. Turns out I managed to fail to install pip in the new conda environment I created, so it tried installing MicrobeCensus in the root conda environment without me realizing. I started over and created a new conda environment properly and installed MicrobeCensus according to instructions, and all worked just fine. Sorry for creating an unnecessary issue :)

snayfach commented 6 years ago

No worries! Glad you got things working. Just FYI, the github release is a newer version than is present on pip.

boulund commented 6 years ago

Yes, I noticed that the github version is newer. Newer is always better, right? :). It seems to be working just fine for me now. No issues at all (so far)!