mandelbrot-project / spectral_lib_matcher

A script based on the matchms library allowing to calculate spectral similarity measures between two mgf (usually a query file and a library file).
GNU General Public License v3.0
9 stars 0 forks source link

Improve install #13

Open Adafede opened 2 years ago

Adafede commented 2 years ago

In order to facilitate install and external use, I wanted to get rid of conda install and tried going the pip way.

I tried adding a setup.cfg for the user to have nice aliases but apparently I did something wrong.

git pull
python3 setup.py install                     
/opt/anaconda3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
  warnings.warn(
running install
/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing src/mandelbrot_spectral_lib_matcher.egg-info/PKG-INFO
writing dependency_links to src/mandelbrot_spectral_lib_matcher.egg-info/dependency_links.txt
writing entry points to src/mandelbrot_spectral_lib_matcher.egg-info/entry_points.txt
writing requirements to src/mandelbrot_spectral_lib_matcher.egg-info/requires.txt
writing top-level names to src/mandelbrot_spectral_lib_matcher.egg-info/top_level.txt
reading manifest file 'src/mandelbrot_spectral_lib_matcher.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'src/mandelbrot_spectral_lib_matcher.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
creating build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/binary.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/logBuilder.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/__init__.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/processor.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/spectral_lib_matcher_indfiles.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/spectral_lib_matcher_par.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/mgf_aggregator.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/nostdout.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/spectral_lib_matcher_bckp.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/mandelbrot_spectral_lib_matcher/generate_individual_metadata.py -> build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher
copying build/lib/processor.py -> build/bdist.macosx-10.9-x86_64/egg
copying build/lib/processor_gui.py -> build/bdist.macosx-10.9-x86_64/egg
copying build/lib/binary_library_builder.py -> build/bdist.macosx-10.9-x86_64/egg
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/binary.py to binary.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/logBuilder.py to logBuilder.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/__init__.py to __init__.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/processor.py to processor.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/spectral_lib_matcher_indfiles.py to spectral_lib_matcher_indfiles.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/spectral_lib_matcher_par.py to spectral_lib_matcher_par.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/mgf_aggregator.py to mgf_aggregator.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/nostdout.py to nostdout.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/spectral_lib_matcher_bckp.py to spectral_lib_matcher_bckp.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/mandelbrot_spectral_lib_matcher/generate_individual_metadata.py to generate_individual_metadata.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/processor.py to processor.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/processor_gui.py to processor_gui.cpython-39.pyc
byte-compiling build/bdist.macosx-10.9-x86_64/egg/binary_library_builder.py to binary_library_builder.cpython-39.pyc
creating build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying src/mandelbrot_spectral_lib_matcher.egg-info/PKG-INFO -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying src/mandelbrot_spectral_lib_matcher.egg-info/SOURCES.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying src/mandelbrot_spectral_lib_matcher.egg-info/dependency_links.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying src/mandelbrot_spectral_lib_matcher.egg-info/entry_points.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying src/mandelbrot_spectral_lib_matcher.egg-info/not-zip-safe -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying src/mandelbrot_spectral_lib_matcher.egg-info/requires.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying src/mandelbrot_spectral_lib_matcher.egg-info/top_level.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
creating 'dist/mandelbrot_spectral_lib_matcher-0.0.1-py3.9.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 mandelbrot_spectral_lib_matcher-0.0.1-py3.9.egg
creating /opt/anaconda3/lib/python3.9/site-packages/mandelbrot_spectral_lib_matcher-0.0.1-py3.9.egg
Extracting mandelbrot_spectral_lib_matcher-0.0.1-py3.9.egg to /opt/anaconda3/lib/python3.9/site-packages
Adding mandelbrot-spectral-lib-matcher 0.0.1 to easy-install.pth file
Installing spectrallibmatcher-binary script to /opt/anaconda3/bin
Installing spectrallibmatcher-processor script to /opt/anaconda3/bin

Installed /opt/anaconda3/lib/python3.9/site-packages/mandelbrot_spectral_lib_matcher-0.0.1-py3.9.egg
Processing dependencies for mandelbrot-spectral-lib-matcher==0.0.1
Searching for pandas==1.3.4
Best match: pandas 1.3.4
Adding pandas 1.3.4 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for numpy==1.20.3
Best match: numpy 1.20.3
Adding numpy 1.20.3 to easy-install.pth file
Installing f2py script to /opt/anaconda3/bin
Installing f2py3 script to /opt/anaconda3/bin
Installing f2py3.9 script to /opt/anaconda3/bin

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for matchms==0.10.0
Best match: matchms 0.10.0
Processing matchms-0.10.0-py3.9.egg
matchms 0.10.0 is already the active version in easy-install.pth

Using /opt/anaconda3/lib/python3.9/site-packages/matchms-0.10.0-py3.9.egg
Searching for pytz==2021.3
Best match: pytz 2021.3
Adding pytz 2021.3 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for python-dateutil==2.8.2
Best match: python-dateutil 2.8.2
Adding python-dateutil 2.8.2 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for scipy==1.7.3
Best match: scipy 1.7.3
Adding scipy 1.7.3 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for requests==2.26.0
Best match: requests 2.26.0
Adding requests 2.26.0 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for pyteomics==4.5
Best match: pyteomics 4.5
Processing pyteomics-4.5-py3.9.egg
pyteomics 4.5 is already the active version in easy-install.pth

Using /opt/anaconda3/lib/python3.9/site-packages/pyteomics-4.5-py3.9.egg
Searching for numba==0.54.1
Best match: numba 0.54.1
Adding numba 0.54.1 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for networkx==2.6.3
Best match: networkx 2.6.3
Processing networkx-2.6.3-py3.9.egg
networkx 2.6.3 is already the active version in easy-install.pth

Using /opt/anaconda3/lib/python3.9/site-packages/networkx-2.6.3-py3.9.egg
Searching for matplotlib==3.5.0
Best match: matplotlib 3.5.0
Adding matplotlib 3.5.0 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for lxml==4.6.4
Best match: lxml 4.6.4
Adding lxml 4.6.4 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for Deprecated==1.2.13
Best match: Deprecated 1.2.13
Adding Deprecated 1.2.13 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for six==1.16.0
Best match: six 1.16.0
Adding six 1.16.0 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for urllib3==1.26.7
Best match: urllib3 1.26.7
Adding urllib3 1.26.7 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for charset-normalizer==2.0.8
Best match: charset-normalizer 2.0.8
Adding charset-normalizer 2.0.8 to easy-install.pth file
Installing normalizer script to /opt/anaconda3/bin

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for certifi==2021.10.8
Best match: certifi 2021.10.8
Adding certifi 2021.10.8 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for idna==3.1
Best match: idna 3.1
Adding idna 3.1 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for setuptools==59.4.0
Best match: setuptools 59.4.0
Adding setuptools 59.4.0 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for llvmlite==0.37.0
Best match: llvmlite 0.37.0
Adding llvmlite 0.37.0 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for packaging==21.3
Best match: packaging 21.3
Adding packaging 21.3 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for fonttools==4.28.3
Best match: fonttools 4.28.3
Adding fonttools 4.28.3 to easy-install.pth file
Installing fonttools script to /opt/anaconda3/bin
Installing pyftmerge script to /opt/anaconda3/bin
Installing pyftsubset script to /opt/anaconda3/bin
Installing ttx script to /opt/anaconda3/bin

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for kiwisolver==1.3.2
Best match: kiwisolver 1.3.2
Adding kiwisolver 1.3.2 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for pyparsing==3.0.6
Best match: pyparsing 3.0.6
Adding pyparsing 3.0.6 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for Pillow==8.4.0
Best match: Pillow 8.4.0
Adding Pillow 8.4.0 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for cycler==0.11.0
Best match: cycler 0.11.0
Adding cycler 0.11.0 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Searching for wrapt==1.13.3
Best match: wrapt 1.13.3
Adding wrapt 1.13.3 to easy-install.pth file

Using /opt/anaconda3/lib/python3.9/site-packages
Finished processing dependencies for mandelbrot-spectral-lib-matcher==0.0.1
➜  spectral_lib_matcher git:(main) ✗ spectrallibmatcher-processor -h              
Traceback (most recent call last):
  File "/opt/anaconda3/bin/spectrallibmatcher-processor", line 33, in <module>
    sys.exit(load_entry_point('mandelbrot-spectral-lib-matcher==0.0.1', 'console_scripts', 'spectrallibmatcher-processor')())
TypeError: 'module' object is not callable

@bjonnh Any help on this?

Adafede commented 2 years ago

Additionnally:

pip install git+https://github.com/mandelbrot-project/spectral_lib_matcher.git
Collecting git+https://github.com/mandelbrot-project/spectral_lib_matcher.git
  Cloning https://github.com/mandelbrot-project/spectral_lib_matcher.git to /private/var/folders/9r/vd1zlj3j0nb8ksm1kb_9stjc0000gp/T/pip-req-build-maz3rtrs
  Running command git clone --filter=blob:none -q https://github.com/mandelbrot-project/spectral_lib_matcher.git /private/var/folders/9r/vd1zlj3j0nb8ksm1kb_9stjc0000gp/T/pip-req-build-maz3rtrs
  Resolved https://github.com/mandelbrot-project/spectral_lib_matcher.git to commit 26e94bb6e07c234abf7ce26a06f60baa3a0c8b79
  Preparing metadata (setup.py) ... done
Requirement already satisfied: matchms in /opt/anaconda3/lib/python3.9/site-packages/matchms-0.10.0-py3.9.egg (from mandelbrot-spectral-lib-matcher==0.0.1) (0.10.0)
Requirement already satisfied: numpy in /opt/anaconda3/lib/python3.9/site-packages (from mandelbrot-spectral-lib-matcher==0.0.1) (1.20.3)
Requirement already satisfied: pandas in /opt/anaconda3/lib/python3.9/site-packages (from mandelbrot-spectral-lib-matcher==0.0.1) (1.3.4)
Requirement already satisfied: deprecated in /opt/anaconda3/lib/python3.9/site-packages (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (1.2.13)
Requirement already satisfied: lxml in /opt/anaconda3/lib/python3.9/site-packages (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (4.6.4)
Requirement already satisfied: matplotlib in /opt/anaconda3/lib/python3.9/site-packages (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (3.5.0)
Requirement already satisfied: networkx in /opt/anaconda3/lib/python3.9/site-packages/networkx-2.6.3-py3.9.egg (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (2.6.3)
Requirement already satisfied: numba>=0.47 in /opt/anaconda3/lib/python3.9/site-packages (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (0.54.1)
Requirement already satisfied: pyteomics>=4.2 in /opt/anaconda3/lib/python3.9/site-packages/pyteomics-4.5-py3.9.egg (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (4.5)
Requirement already satisfied: requests in /opt/anaconda3/lib/python3.9/site-packages (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (2.26.0)
Requirement already satisfied: scipy in /opt/anaconda3/lib/python3.9/site-packages (from matchms->mandelbrot-spectral-lib-matcher==0.0.1) (1.7.3)
Requirement already satisfied: python-dateutil>=2.7.3 in /opt/anaconda3/lib/python3.9/site-packages (from pandas->mandelbrot-spectral-lib-matcher==0.0.1) (2.8.2)
Requirement already satisfied: pytz>=2017.3 in /opt/anaconda3/lib/python3.9/site-packages (from pandas->mandelbrot-spectral-lib-matcher==0.0.1) (2021.3)
Requirement already satisfied: setuptools in /opt/anaconda3/lib/python3.9/site-packages (from numba>=0.47->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (59.4.0)
Requirement already satisfied: llvmlite<0.38,>=0.37.0rc1 in /opt/anaconda3/lib/python3.9/site-packages (from numba>=0.47->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (0.37.0)
Requirement already satisfied: six>=1.5 in /opt/anaconda3/lib/python3.9/site-packages (from python-dateutil>=2.7.3->pandas->mandelbrot-spectral-lib-matcher==0.0.1) (1.16.0)
Requirement already satisfied: wrapt<2,>=1.10 in /opt/anaconda3/lib/python3.9/site-packages (from deprecated->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (1.13.3)
Requirement already satisfied: pyparsing>=2.2.1 in /opt/anaconda3/lib/python3.9/site-packages (from matplotlib->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (3.0.6)
Requirement already satisfied: pillow>=6.2.0 in /opt/anaconda3/lib/python3.9/site-packages (from matplotlib->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (8.4.0)
Requirement already satisfied: cycler>=0.10 in /opt/anaconda3/lib/python3.9/site-packages (from matplotlib->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/anaconda3/lib/python3.9/site-packages (from matplotlib->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (1.3.2)
Requirement already satisfied: packaging>=20.0 in /opt/anaconda3/lib/python3.9/site-packages (from matplotlib->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (21.3)
Requirement already satisfied: fonttools>=4.22.0 in /opt/anaconda3/lib/python3.9/site-packages (from matplotlib->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (4.28.3)
Requirement already satisfied: idna<4,>=2.5 in /opt/anaconda3/lib/python3.9/site-packages (from requests->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (3.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/anaconda3/lib/python3.9/site-packages (from requests->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (1.26.7)
Requirement already satisfied: charset-normalizer~=2.0.0 in /opt/anaconda3/lib/python3.9/site-packages (from requests->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (2.0.8)
Requirement already satisfied: certifi>=2017.4.17 in /opt/anaconda3/lib/python3.9/site-packages (from requests->matchms->mandelbrot-spectral-lib-matcher==0.0.1) (2021.10.8)
Building wheels for collected packages: mandelbrot-spectral-lib-matcher
  Building wheel for mandelbrot-spectral-lib-matcher (setup.py) ... done
  Created wheel for mandelbrot-spectral-lib-matcher: filename=mandelbrot_spectral_lib_matcher-0.0.1-py3-none-any.whl size=33309 sha256=56d0e49de21966258fce84c2401de391b1d7ce2f8065b2a42492e26ffe37db38
  Stored in directory: /private/var/folders/9r/vd1zlj3j0nb8ksm1kb_9stjc0000gp/T/pip-ephem-wheel-cache-ykxavshr/wheels/3a/0c/df/9d52f2d5f826be729b707a46fa9e024adf1862bb63b84a3bb4
Successfully built mandelbrot-spectral-lib-matcher
Installing collected packages: mandelbrot-spectral-lib-matcher
ERROR: For req: mandelbrot-spectral-lib-matcher==0.0.1. Invalid script entry point: <ExportEntry spectrallibmatcher-binary = mandelbrot_spectral_lib_matcher.binary:None []> - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.
Adafede commented 2 years ago

So 915dd7622a6313b9da0db24a2c9d49553da6ae3e fixed the second issue but I think processor.py still needs some refactoring in order for it to work as a callable module.

Adafede commented 2 years ago

@florian-huber may I ask for your help on this one also?

Adafede commented 2 years ago

@ArnaudGaudry with the recent MEMO expertise, some help? 😄

florian-huber commented 2 years ago

Sorry @Adafede I apparently completely missed this one... I will see if I find some time to have a lookg next week (also feel free to ping me again if I don't react in time 😄 )

I anyway wanted to have a closer look at your code because we are now working a lot on implementing a pipeline tool in matchms.

Adafede commented 2 years ago

No problems @florian-huber! We all know how it is 😉

Btw, for the code, credit goes to @oolonek and @bjonnh mainly...I am just here to put some fancy decorations...if I manage to. I just updated some parts to be up-to-date with your latest matchms version!