Giter Site home page Giter Site logo

Comments (3)

alastair-droop avatar alastair-droop commented on August 11, 2024

I'm not sure, as I can't reproduce this error. My guess is that it is something to do with a bug which was fixed in 2018 (https://bugs.python.org/issue24089). If this is the case, then your issue will be getting process-featurecounts to use the "correct" version of python. I can see from your logs that it is building against python2.7, even though your system has python3 available. You can test what the default python and argparse versions are using the following:

import argparse
import sys
print('python version:')
print(sys.version)
print('argparse version is %s' % argparse.__version__)

If this is a python2 / 3 issue, then you can try explicitly installing via python 3:

$ git clone https://github.com/alastair-droop/process-featurecounts.git
$ cd process-featurecounts
$ python3 setup.py install --user # NB: Use python3 here!

from process-featurecounts.

gnmcsbnfrmtcsclb avatar gnmcsbnfrmtcsclb commented on August 11, 2024

Thanks for your response. We threw those lines into a script, and the STDOUT looks as follows:

For python3

(base) lotte@HPC1:~/lotte/process-featurecounts$ python3 test.py 
python version:
3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
argparse version is 1.1

For python2

(base) lotte@HPC1:~/lotte/process-featurecounts$ python2 test.py 
python version:
2.7.15 (default, Feb 20 2019, 00:32:29) 
[GCC 7.3.0]
argparse version is 1.1

STDOUT during python3-based Install

(base) lotte@HPC1:~/software_downloads/process-featurecounts$ python3 setup.py install --user
running install
running bdist_egg
running egg_info
creating prfeaturecounts.egg-info
writing prfeaturecounts.egg-info/PKG-INFO
writing top-level names to prfeaturecounts.egg-info/top_level.txt
writing entry points to prfeaturecounts.egg-info/entry_points.txt
writing dependency_links to prfeaturecounts.egg-info/dependency_links.txt
writing manifest file 'prfeaturecounts.egg-info/SOURCES.txt'
reading manifest file 'prfeaturecounts.egg-info/SOURCES.txt'
writing manifest file 'prfeaturecounts.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/prfeaturecounts
copying prfeaturecounts/version.py -> build/lib/prfeaturecounts
copying prfeaturecounts/__init__.py -> build/lib/prfeaturecounts
copying prfeaturecounts/scripts.py -> build/lib/prfeaturecounts
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/prfeaturecounts
copying build/lib/prfeaturecounts/version.py -> build/bdist.linux-x86_64/egg/prfeaturecounts
copying build/lib/prfeaturecounts/scripts.py -> build/bdist.linux-x86_64/egg/prfeaturecounts
copying build/lib/prfeaturecounts/__init__.py -> build/bdist.linux-x86_64/egg/prfeaturecounts
byte-compiling build/bdist.linux-x86_64/egg/prfeaturecounts/version.py to version.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/prfeaturecounts/scripts.py to scripts.cpython-35.pyc
byte-compiling build/bdist.linux-x86_64/egg/prfeaturecounts/__init__.py to __init__.cpython-35.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
prfeaturecounts.__pycache__.scripts.cpython-35: module references __file__
creating dist
creating 'dist/prfeaturecounts-1.0.1-py3.5.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing prfeaturecounts-1.0.1-py3.5.egg
removing '/home/lotte/.local/lib/python3.5/site-packages/prfeaturecounts-1.0.1-py3.5.egg' (and everything under it)
creating /home/lotte/.local/lib/python3.5/site-packages/prfeaturecounts-1.0.1-py3.5.egg
Extracting prfeaturecounts-1.0.1-py3.5.egg to /home/lotte/.local/lib/python3.5/site-packages
prfeaturecounts 1.0.1 is already the active version in easy-install.pth
Installing process-featurecounts script to /home/lotte/.local/bin

Installed /home/lotte/.local/lib/python3.5/site-packages/prfeaturecounts-1.0.1-py3.5.egg
Processing dependencies for prfeaturecounts==1.0.1
Finished processing dependencies for prfeaturecounts==1.0.1

No Help Menu from python3-based Install

(base) lotte@HPC1:~/software_downloads/process-featurecounts$ process-featurecounts -h
Traceback (most recent call last):
  File "/home/lotte/.local/bin/process-featurecounts", line 11, in <module>
    load_entry_point('prfeaturecounts==1.0.1', 'console_scripts', 'process-featurecounts')()
  File "/home/lotte/.local/lib/python3.5/site-packages/prfeaturecounts-1.0.1-py3.5.egg/prfeaturecounts/scripts.py", line 48, in main
    args = parser.parse_args()
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 1726, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 1758, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 1964, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 1904, in consume_optional
    take_action(action, args, option_string)
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 1832, in take_action
    action(self, namespace, argument_values, option_string)
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 1016, in __call__
    parser.print_help()
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 2358, in print_help
    self._print_message(self.format_help(), file)
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 2342, in format_help
    return formatter.format_help()
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 278, in format_help
    help = self._root_section.format_help()
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 208, in format_help
    func(*args)
  File "/home/lotte/anaconda3/lib/python3.5/argparse.py", line 329, in _format_usage
    assert ' '.join(opt_parts) == opt_usage
AssertionError

I was not able to get python3-based installation to return the help menu, as was the case with the python2-based install I report in my 1st message in this thread. I'm not sure what is happening... any ideas, please? Thanks again.

from process-featurecounts.

alastair-droop avatar alastair-droop commented on August 11, 2024

OK. I've created a new branch (argparse-gnmcsbnfrmtcsclb) for this. The only difference is that there's now a standalone script that will help us to narrow down the source of your version issues. Please try the following:

git clone -b argparse-gnmcsbnfrmtcsclb https://github.com/alastair-droop/process-featurecounts.git
cd process-featurecounts/
chmod a+x prf-standalone.py
./prf-standalone.py -h

This is simply the same script but without any attempt to "install" it via setup. Hopefully this will get us closer, as we can specify specific python versions.

from process-featurecounts.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.