MSIPred
1
0
Entering edit mode
23 months ago

Hello!

I am new to python (first time)

I am trying to use this on my MAF data: https://github.com/wangc29/MSIpred

I attempt to run the first line and get error:

(base) abkhan@Abduls-MacBook-Pro MSIpred-master % python2 setup.py install 
running install
running bdist_egg
running egg_info
writing requirements to MSIpred.egg-info/requires.txt
writing MSIpred.egg-info/PKG-INFO
writing top-level names to MSIpred.egg-info/top_level.txt
writing dependency_links to MSIpred.egg-info/dependency_links.txt
reading manifest file 'MSIpred.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MSIpred.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-x86_64/egg
running install_lib
running build_py
creating build/bdist.macosx-10.9-x86_64/egg
copying build/lib/.DS_Store -> build/bdist.macosx-10.9-x86_64/egg
creating build/bdist.macosx-10.9-x86_64/egg/MSIpred
copying build/lib/MSIpred/best_svm_pipeline.pkl -> build/bdist.macosx-10.9-x86_64/egg/MSIpred
copying build/lib/MSIpred/model_training.py -> build/bdist.macosx-10.9-x86_64/egg/MSIpred
copying build/lib/MSIpred/predict_msi.py -> build/bdist.macosx-10.9-x86_64/egg/MSIpred
copying build/lib/MSIpred/__init__.py -> build/bdist.macosx-10.9-x86_64/egg/MSIpred
copying build/lib/MSIpred/tagged_maf.py -> build/bdist.macosx-10.9-x86_64/egg/MSIpred
copying build/lib/MSIpred/raw_maf.py -> build/bdist.macosx-10.9-x86_64/egg/MSIpred
byte-compiling build/bdist.macosx-10.9-x86_64/egg/MSIpred/model_training.py to model_training.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/MSIpred/predict_msi.py to predict_msi.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/MSIpred/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/MSIpred/tagged_maf.py to tagged_maf.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/MSIpred/raw_maf.py to raw_maf.pyc
creating build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying MSIpred.egg-info/PKG-INFO -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying MSIpred.egg-info/SOURCES.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying MSIpred.egg-info/dependency_links.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying MSIpred.egg-info/not-zip-safe -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying MSIpred.egg-info/requires.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying MSIpred.egg-info/top_level.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
creating 'dist/MSIpred-0.1-py2.7.egg' and adding 'build/bdist.macosx-10.9-x86_64/egg' to it
removing 'build/bdist.macosx-10.9-x86_64/egg' (and everything under it)
Processing MSIpred-0.1-py2.7.egg
removing '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MSIpred-0.1-py2.7.egg' (and everything under it)
creating /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MSIpred-0.1-py2.7.egg
Extracting MSIpred-0.1-py2.7.egg to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
MSIpred 0.1 is already the active version in easy-install.pth

Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MSIpred-0.1-py2.7.egg
Processing dependencies for MSIpred==0.1
Searching for pandas
Reading https://pypi.org/simple/pandas/
Downloading https://files.pythonhosted.org/packages/4d/07/c4d69e1acb7723ca49d24fc60a89aa07a914dfb8e7a07fdbb9d8646630cd/pandas-1.5.2.tar.gz#sha256=220b98d15cee0b2cd839a6358bd1f273d0356bf964c1a1aeb32d47db0215488b
Best match: pandas 1.5.2
Processing pandas-1.5.2.tar.gz
Writing /var/folders/dj/d01g66_j455dnpmrtjd543qm0000gn/T/easy_install-gHzy5J/pandas-1.5.2/setup.cfg
Running pandas-1.5.2/setup.py -q bdist_egg --dist-dir /var/folders/dj/d01g66_j455dnpmrtjd543qm0000gn/T/easy_install-gHzy5J/pandas-1.5.2/egg-dist-tmp-olLtp6
Traceback (most recent call last):
  File "setup.py", line 18, in <module>
    zip_safe=False)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
    cmd.run()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 418, in run
    self.easy_install(spec, not self.no_deps)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 660, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 707, in install_item
    self.process_distribution(spec, dist, deps)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 752, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
    run_setup(setup_script, args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 44, in _execfile
    code = compile(script, filename, 'exec')
  File "/var/folders/dj/d01g66_j455dnpmrtjd543qm0000gn/T/easy_install-gHzy5J/pandas-1.5.2/setup.py", line 250
    f"{extension}-source file '{sourcefile}' not found.\n"
                                                         ^
SyntaxError: invalid syntax
(base) abkhan@Abduls-MacBook-Pro MSIpred-master % 

Please advise?

MSI Python • 572 views
ADD COMMENT
0
Entering edit mode
23 months ago
Mensur Dlakic ★ 28k

It seems like you got stuck because pandas library only works with python3. Depending on what is the default python version on your system, you may need to re-run with either of the two commands below:

python3 setup.py install

or

python setup.py install
ADD COMMENT

Login before adding your answer.

Traffic: 1972 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6