Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypingError Decoupler Import #34

Closed
jvogenstahl opened this issue Apr 20, 2023 · 6 comments
Closed

TypingError Decoupler Import #34

jvogenstahl opened this issue Apr 20, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@jvogenstahl
Copy link

jvogenstahl commented Apr 20, 2023

Dear Decoupler team,

I followed the PerMedCoE hands-on course on Tuesday and I'm trying to apply the analysis to my data (spatial transcriptomics) following the GoogleCollab file.

I managed to create the 'signalling' environment and I believe I managed to install all packages in Jupyter. However, I get a TypingError when importing decoupler in python and can't figure out what's wrong (see below).

Any assistance would be very welcome.

Have a great day,

Johanna

My code:

!pip install cvxpy==1.3.1 cylp==0.91.5 gurobipy==10.0.1
!pip install pypath-omnipath
!pip install omnipath
!pip install decoupler
!pip install corneto-0.9.1a0-py3-none-any.whl
!pip install --upgrade numba

import decoupler as dc

Error message:

---------------------------------------------------------------------------
TypingError                               Traceback (most recent call last)
<ipython-input-66-3ed1422ba4b9> in <module>
----> 1 import decoupler as dc

~/opt/anaconda3/lib/python3.7/site-packages/decoupler/__init__.py in <module>
     14 from .method_udt import run_udt  # noqa: F401
     15 from .method_ora import run_ora, test1r, get_ora_df  # noqa: F401
---> 16 from .method_gsva import run_gsva  # noqa: F401
     17 from .method_gsea import run_gsea  # noqa: F401
     18 from .method_viper import run_viper  # noqa: F401

~/opt/anaconda3/lib/python3.7/site-packages/decoupler/method_gsva.py in <module>
     80 
     81 
---> 82 @nb.njit(nb.types.Tuple((nb.f4[:, :], nb.i8[:, :]))(nb.f4[:, :]), parallel=True, cache=True)
     83 def nb_get_D_I(mat):
     84     n = mat.shape[1]

~/opt/anaconda3/lib/python3.7/site-packages/numba/decorators.py in wrapper(func)
    184             with typeinfer.register_dispatcher(disp):
    185                 for sig in sigs:
--> 186                     disp.compile(sig)
    187                 disp.disable_compile()
    188         return disp

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler_lock.py in _acquire_compile_lock(*args, **kwargs)
     30         def _acquire_compile_lock(*args, **kwargs):
     31             with self:
---> 32                 return func(*args, **kwargs)
     33         return _acquire_compile_lock
     34 

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in compile(self, sig)
    691 
    692             self._cache_misses[sig] += 1
--> 693             cres = self._compiler.compile(args, return_type)
    694             self.add_overload(cres)
    695             self._cache.save_overload(sig, cres)

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in compile(self, args, return_type)
     78             return retval
     79         else:
---> 80             raise retval
     81 
     82     def _compile_cached(self, args, return_type):

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in _compile_cached(self, args, return_type)
     88 
     89         try:
---> 90             retval = self._compile_core(args, return_type)
     91         except errors.TypingError as e:
     92             self._failed_cache[key] = e

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in _compile_core(self, args, return_type)
    106                                       args=args, return_type=return_type,
    107                                       flags=flags, locals=self.locals,
--> 108                                       pipeline_class=self.pipeline_class)
    109         # Check typing error if object mode is used
    110         if cres.typing_error is not None and not flags.enable_pyobject:

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in compile_extra(typingctx, targetctx, func, args, return_type, flags, locals, library, pipeline_class)
    970     pipeline = pipeline_class(typingctx, targetctx, library,
    971                               args, return_type, flags, locals)
--> 972     return pipeline.compile_extra(func)
    973 
    974 

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in compile_extra(self, func)
    388         self.lifted = ()
    389         self.lifted_from = None
--> 390         return self._compile_bytecode()
    391 
    392     def compile_ir(self, func_ir, lifted=(), lifted_from=None):

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in _compile_bytecode(self)
    901         """
    902         assert self.func_ir is None
--> 903         return self._compile_core()
    904 
    905     def _compile_ir(self):

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in _compile_core(self)
    888         self.define_pipelines(pm)
    889         pm.finalize()
--> 890         res = pm.run(self.status)
    891         if res is not None:
    892             # Early pipeline completion

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler_lock.py in _acquire_compile_lock(*args, **kwargs)
     30         def _acquire_compile_lock(*args, **kwargs):
     31             with self:
---> 32                 return func(*args, **kwargs)
     33         return _acquire_compile_lock
     34 

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in run(self, status)
    264                     # No more fallback pipelines?
    265                     if is_final_pipeline:
--> 266                         raise patched_exception
    267                     # Go to next fallback pipeline
    268                     else:

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in run(self, status)
    255                 try:
    256                     event("-- %s" % stage_name)
--> 257                     stage()
    258                 except _EarlyPipelineCompletion as e:
    259                     return e.result

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in stage_nopython_frontend(self)
    513                 self.args,
    514                 self.return_type,
--> 515                 self.locals)
    516             self.typemap = typemap
    517             self.return_type = return_type

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in type_inference_stage(typingctx, interp, args, return_type, locals)
   1122 
   1123         infer.build_constraint()
-> 1124         infer.propagate()
   1125         typemap, restype, calltypes = infer.unify()
   1126 

~/opt/anaconda3/lib/python3.7/site-packages/numba/typeinfer.py in propagate(self, raise_errors)
    925         if errors:
    926             if raise_errors:
--> 927                 raise errors[0]
    928             else:
    929                 return errors

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<built-in function arange>) with argument(s) of type(s): (dtype=class(float32), start=int64, step=Literal[int](-1), stop=Literal[int](0))
 * parameterized
In definition 0:
    AssertionError: 
    raised from /Users/johannavogenstahl/opt/anaconda3/lib/python3.7/site-packages/numba/typing/npydecl.py:631
In definition 1:
    AssertionError: 
    raised from /Users/johannavogenstahl/opt/anaconda3/lib/python3.7/site-packages/numba/typing/npydecl.py:631
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<built-in function arange>)
[2] During: typing of call at /Users/johannavogenstahl/opt/anaconda3/lib/python3.7/site-packages/decoupler/method_gsva.py (85)


File "../../../opt/anaconda3/lib/python3.7/site-packages/decoupler/method_gsva.py", line 85:
def nb_get_D_I(mat):
    <source elided>
    n = mat.shape[1]
    rev_idx = np.abs(np.arange(start=n, stop=0, step=-1, dtype=nb.f4) - n / 2)
    ^
@jvogenstahl jvogenstahl added the question User question: anything that's not obviously a bug label Apr 20, 2023
@deeenes deeenes added bug Something isn't working and removed question User question: anything that's not obviously a bug labels Apr 20, 2023
@PauBadiaM
Copy link
Member

Hi @jvogenstahl

Unfortunately, this looks like a dependency issue with GoogleColab, could you try to redo the enviroment without upgrading numba? So basically:

!pip install cvxpy==1.3.1 cylp==0.91.5 gurobipy==10.0.1
!pip install pypath-omnipath
!pip install omnipath
!pip install decoupler
!pip install corneto-0.9.1a0-py3-none-any.whl

import decoupler as dc

@jvogenstahl
Copy link
Author

jvogenstahl commented Apr 24, 2023

Hi Pau,

Thanks for your help !
I just tried the code without the Numba upgrade. Please find below the new typing error.

Best,

Jo

Collecting cvxpy==1.3.1
  Using cached cvxpy-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl (932 kB)
Collecting cylp==0.91.5
  Using cached cylp-0.91.5-cp39-cp39-macosx_10_9_x86_64.whl (4.4 MB)
Collecting gurobipy==10.0.1
  Using cached gurobipy-10.0.1-cp39-cp39-macosx_10_9_universal2.whl (10.3 MB)
Collecting osqp>=0.4.1
  Using cached osqp-0.6.2.post9-cp39-cp39-macosx_10_9_x86_64.whl (252 kB)
Collecting scs>=1.1.6
  Using cached scs-3.2.3-cp39-cp39-macosx_10_9_x86_64.whl (11.6 MB)
Requirement already satisfied: setuptools>65.5.1 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from cvxpy==1.3.1) (65.6.3)
Collecting scipy>=1.1.0
  Using cached scipy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl (35.2 MB)
Collecting numpy>=1.15
  Downloading numpy-1.24.3-cp39-cp39-macosx_10_9_x86_64.whl (19.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.8/19.8 MB 27.5 MB/s eta 0:00:0000:0100:01
Collecting ecos>=2
  Using cached ecos-2.0.12-cp39-cp39-macosx_10_9_x86_64.whl (90 kB)
Collecting qdldl
  Using cached qdldl-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl (102 kB)
Installing collected packages: gurobipy, numpy, scipy, scs, qdldl, ecos, cylp, osqp, cvxpy
Successfully installed cvxpy-1.3.1 cylp-0.91.5 ecos-2.0.12 gurobipy-10.0.1 numpy-1.24.3 osqp-0.6.2.post9 qdldl-0.1.7 scipy-1.10.1 scs-3.2.3
Collecting pypath-omnipath
  Downloading pypath_omnipath-0.14.48-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 12.9 MB/s eta 0:00:0000:0100:01
Collecting psutil
  Downloading psutil-5.9.5-cp36-abi3-macosx_10_9_x86_64.whl (245 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 245.3/245.3 kB 6.3 MB/s eta 0:00:00a 0:00:01
Collecting future
  Downloading future-0.18.3.tar.gz (840 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 840.9/840.9 kB 13.5 MB/s eta 0:00:0000:01
  Preparing metadata (setup.py) ... done
Collecting sqlparse
  Downloading sqlparse-0.4.4-py3-none-any.whl (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.2/41.2 kB 1.4 MB/s eta 0:00:00
Collecting PyYAML
  Downloading PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl (197 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 197.6/197.6 kB 7.0 MB/s eta 0:00:00
Collecting rdata
  Using cached rdata-0.9-py3-none-any.whl (19 kB)
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.0/143.0 kB 5.2 MB/s eta 0:00:00
Collecting timeloop
  Using cached timeloop-1.0.2.tar.gz (2.9 kB)
  Preparing metadata (setup.py) ... done
Collecting openpyxl
  Downloading openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 250.0/250.0 kB 7.8 MB/s eta 0:00:00
Collecting lxml
  Downloading lxml-4.9.2-cp39-cp39-macosx_10_15_x86_64.whl (4.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.8/4.8 MB 24.9 MB/s eta 0:00:0000:0100:01
Requirement already satisfied: tqdm in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pypath-omnipath) (4.64.1)
Collecting dill
  Using cached dill-0.3.6-py3-none-any.whl (110 kB)
Collecting tabulate
  Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting pyreadr
  Downloading pyreadr-0.4.7-cp39-cp39-macosx_10_9_x86_64.whl (253 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 253.5/253.5 kB 7.8 MB/s eta 0:00:00
Requirement already satisfied: numpy in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pypath-omnipath) (1.24.3)
Collecting typing_extensions
  Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Requirement already satisfied: requests in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pypath-omnipath) (2.28.1)
Collecting glom
  Downloading glom-23.3.0-py3-none-any.whl (101 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.9/101.9 kB 3.8 MB/s eta 0:00:00
Collecting xlrd
  Downloading xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.5/96.5 kB 3.2 MB/s eta 0:00:00
Requirement already satisfied: scipy in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pypath-omnipath) (1.10.1)
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting matplotlib
  Downloading matplotlib-3.7.1-cp39-cp39-macosx_10_12_x86_64.whl (7.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.4/7.4 MB 13.6 MB/s eta 0:00:0000:0100:01
Collecting pandas
  Downloading pandas-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl (11.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.8/11.8 MB 25.7 MB/s eta 0:00:0000:0100:01
Collecting pysftp<0.3.0,>=0.2.9
  Downloading pysftp-0.2.9.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
Collecting pycurl
  Downloading pycurl-7.45.2.tar.gz (234 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 234.2/234.2 kB 6.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting paramiko>=1.17
  Downloading paramiko-3.1.0-py3-none-any.whl (211 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 211.2/211.2 kB 7.7 MB/s eta 0:00:00
Collecting soupsieve>1.2
  Downloading soupsieve-2.4.1-py3-none-any.whl (36 kB)
Collecting boltons>=19.3.0
  Downloading boltons-23.0.0-py2.py3-none-any.whl (194 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 194.8/194.8 kB 7.3 MB/s eta 0:00:00
Collecting face==20.1.1
  Downloading face-20.1.1-py3-none-any.whl (51 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 1.7 MB/s eta 0:00:00
Collecting attrs
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting cycler>=0.10
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting python-dateutil>=2.7
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 7.4 MB/s eta 0:00:00
Collecting contourpy>=1.0.1
  Downloading contourpy-1.0.7-cp39-cp39-macosx_10_9_x86_64.whl (244 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 244.3/244.3 kB 7.4 MB/s eta 0:00:00
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.4.4-cp39-cp39-macosx_10_9_x86_64.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 2.3 MB/s eta 0:00:00
Collecting pillow>=6.2.0
  Downloading Pillow-9.5.0-cp39-cp39-macosx_10_10_x86_64.whl (3.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 23.6 MB/s eta 0:00:0000:0100:01
Collecting fonttools>=4.22.0
  Downloading fonttools-4.39.3-py3-none-any.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 17.2 MB/s eta 0:00:0000:01
Collecting packaging>=20.0
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting pyparsing>=2.3.1
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 3.4 MB/s eta 0:00:00
Collecting importlib-resources>=3.2.0
  Downloading importlib_resources-5.12.0-py3-none-any.whl (36 kB)
Collecting et-xmlfile
  Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting pytz>=2020.1
  Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.3/502.3 kB 11.2 MB/s eta 0:00:0000:01
Collecting tzdata>=2022.1
  Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 341.8/341.8 kB 8.2 MB/s eta 0:00:0000:01
Collecting xarray
  Downloading xarray-2023.4.2-py3-none-any.whl (979 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 979.5/979.5 kB 14.7 MB/s eta 0:00:0000:01
Requirement already satisfied: certifi>=2017.4.17 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from requests->pypath-omnipath) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from requests->pypath-omnipath) (1.26.14)
Requirement already satisfied: idna<4,>=2.5 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from requests->pypath-omnipath) (3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from requests->pypath-omnipath) (2.0.4)
Collecting zipp>=3.1.0
  Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB)
Requirement already satisfied: cryptography>=3.3 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from paramiko>=1.17->pysftp<0.3.0,>=0.2.9->pypath-omnipath) (38.0.4)
Collecting bcrypt>=3.2
  Downloading bcrypt-4.0.1-cp36-abi3-macosx_10_10_universal2.whl (473 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 473.4/473.4 kB 10.1 MB/s eta 0:00:0000:01
Collecting pynacl>=1.5
  Downloading PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl (349 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 349.9/349.9 kB 9.0 MB/s eta 0:00:0000:01
Requirement already satisfied: six>=1.5 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib->pypath-omnipath) (1.16.0)
Requirement already satisfied: cffi>=1.12 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from cryptography>=3.3->paramiko>=1.17->pysftp<0.3.0,>=0.2.9->pypath-omnipath) (1.15.1)
Requirement already satisfied: pycparser in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.3->paramiko>=1.17->pysftp<0.3.0,>=0.2.9->pypath-omnipath) (2.21)
Building wheels for collected packages: pysftp, future, pycurl, timeloop
  Building wheel for pysftp (setup.py) ... done
  Created wheel for pysftp: filename=pysftp-0.2.9-py3-none-any.whl size=15496 sha256=11c6c0deabfd0f5e2ddc73b7a6d2a8b5f01688c3b5fd7ea9c8adc631646c0db7
  Stored in directory: /Users/johannavogenstahl/Library/Caches/pip/wheels/72/aa/b2/489b05a4c1046ccbf628cb3a4bac193d8e0531c2edb21e4426
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492025 sha256=35d191a60e80b8e55283659f5eccec2c4b286194acec6d7003e8d97165342eca
  Stored in directory: /Users/johannavogenstahl/Library/Caches/pip/wheels/0c/ff/54/efb16da5b1058114a457b3c7167904915d2e5764b637ae8d3d
  Building wheel for pycurl (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Using curl-config (libcurl 7.79.1)
      Warning: libcurl is configured to use SSL, but we have not been able to determine which SSL backend it is using. If your Curl is built against OpenSSL, LibreSSL, BoringSSL, GnuTLS, NSS, mbedTLS, or Secure Transport please specify the SSL backend manually. For other SSL backends please ignore this message.Not using an SSL library
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-cpython-39
      creating build/lib.macosx-10.9-x86_64-cpython-39/curl
      copying python/curl/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/curl
      running build_ext
      building 'pycurl' extension
      creating build/temp.macosx-10.9-x86_64-cpython-39
      creating build/temp.macosx-10.9-x86_64-cpython-39/src
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/johannavogenstahl/miniconda3/include -arch x86_64 -I/Users/johannavogenstahl/miniconda3/include -fPIC -O2 -isystem /Users/johannavogenstahl/miniconda3/include -arch x86_64 -DPYCURL_VERSION=\"7.45.2\" -DHAVE_CURL_SSL=1 -I/Users/johannavogenstahl/miniconda3/include/python3.9 -c src/docstrings.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/docstrings.o
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycurl
  Running setup.py clean for pycurl
  Building wheel for timeloop (setup.py) ... done
  Created wheel for timeloop: filename=timeloop-1.0.2-py3-none-any.whl size=3703 sha256=474e9ffc11efdb573b21e38c699ebc91cd6fe231a77a4b9cbf2a22e2befa0263
  Stored in directory: /Users/johannavogenstahl/Library/Caches/pip/wheels/c1/32/b4/1480823224ec0df9314b4785e7c399fbb2fef7e8bc1d95ee0c
Successfully built pysftp future timeloop
Failed to build pycurl
Installing collected packages: timeloop, pytz, boltons, zipp, xlrd, tzdata, typing_extensions, toml, tabulate, sqlparse, soupsieve, PyYAML, python-dateutil, pyparsing, pycurl, psutil, pillow, packaging, lxml, kiwisolver, future, fonttools, face, et-xmlfile, dill, cycler, contourpy, bcrypt, attrs, pynacl, pandas, openpyxl, importlib-resources, glom, beautifulsoup4, xarray, pyreadr, paramiko, matplotlib, rdata, pysftp, pypath-omnipath
  Running setup.py install for pycurl ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pycurl did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Using curl-config (libcurl 7.79.1)
      Warning: libcurl is configured to use SSL, but we have not been able to determine which SSL backend it is using. If your Curl is built against OpenSSL, LibreSSL, BoringSSL, GnuTLS, NSS, mbedTLS, or Secure Transport please specify the SSL backend manually. For other SSL backends please ignore this message.Not using an SSL library
      running install
      /Users/johannavogenstahl/miniconda3/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(
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-cpython-39
      creating build/lib.macosx-10.9-x86_64-cpython-39/curl
      copying python/curl/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-39/curl
      running build_ext
      building 'pycurl' extension
      creating build/temp.macosx-10.9-x86_64-cpython-39
      creating build/temp.macosx-10.9-x86_64-cpython-39/src
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/johannavogenstahl/miniconda3/include -arch x86_64 -I/Users/johannavogenstahl/miniconda3/include -fPIC -O2 -isystem /Users/johannavogenstahl/miniconda3/include -arch x86_64 -DPYCURL_VERSION=\"7.45.2\" -DHAVE_CURL_SSL=1 -I/Users/johannavogenstahl/miniconda3/include/python3.9 -c src/docstrings.c -o build/temp.macosx-10.9-x86_64-cpython-39/src/docstrings.o
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycurl

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Collecting omnipath
  Using cached omnipath-1.0.6-py3-none-any.whl (41 kB)
Requirement already satisfied: tqdm>=4.51.0 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from omnipath) (4.64.1)
Requirement already satisfied: urllib3>=1.26.0 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from omnipath) (1.26.14)
Collecting packaging
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting wrapt>=1.12.0
  Downloading wrapt-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl (35 kB)
Collecting inflect>=4.1.0
  Using cached inflect-6.0.4-py3-none-any.whl (34 kB)
Collecting attrs>=20.2.0
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from omnipath) (4.5.0)
Requirement already satisfied: requests>=2.24.0 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from omnipath) (2.28.1)
Collecting docrep>=0.3.1
  Using cached docrep-0.3.2.tar.gz (33 kB)
  Preparing metadata (setup.py) ... done
Collecting pandas>=1.2.0
  Using cached pandas-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl (11.8 MB)
Requirement already satisfied: six in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from docrep>=0.3.1->omnipath) (1.16.0)
Collecting pydantic>=1.9.1
  Downloading pydantic-1.10.7-cp39-cp39-macosx_10_9_x86_64.whl (2.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 20.7 MB/s eta 0:00:0000:0100:01
Requirement already satisfied: numpy>=1.20.3 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pandas>=1.2.0->omnipath) (1.24.3)
Requirement already satisfied: python-dateutil>=2.8.2 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pandas>=1.2.0->omnipath) (2.8.2)
Requirement already satisfied: tzdata>=2022.1 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pandas>=1.2.0->omnipath) (2023.3)
Requirement already satisfied: pytz>=2020.1 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pandas>=1.2.0->omnipath) (2023.3)
Requirement already satisfied: idna<4,>=2.5 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from requests>=2.24.0->omnipath) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from requests>=2.24.0->omnipath) (2022.12.7)
Requirement already satisfied: charset-normalizer<3,>=2 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from requests>=2.24.0->omnipath) (2.0.4)
Building wheels for collected packages: docrep
  Building wheel for docrep (setup.py) ... done
  Created wheel for docrep: filename=docrep-0.3.2-py3-none-any.whl size=19877 sha256=a38f24abda33c80e2645d0da2f2110bae193d8b6624b1de1662d3193716896f4
  Stored in directory: /Users/johannavogenstahl/Library/Caches/pip/wheels/2d/65/94/106d18cba8b1c40e950207578d55bb442f3131c9f3b94b2553
Successfully built docrep
Installing collected packages: wrapt, pydantic, packaging, docrep, attrs, pandas, inflect, omnipath
Successfully installed attrs-23.1.0 docrep-0.3.2 inflect-6.0.4 omnipath-1.0.6 packaging-23.1 pandas-2.0.1 pydantic-1.10.7 wrapt-1.15.0
Collecting decoupler
  Using cached decoupler-1.3.4-py3-none-any.whl (76 kB)
Collecting anndata
  Downloading anndata-0.9.1-py3-none-any.whl (102 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.0/103.0 kB 2.9 MB/s eta 0:00:00
Collecting numba
  Downloading numba-0.56.4-cp39-cp39-macosx_10_14_x86_64.whl (2.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 9.2 MB/s eta 0:00:00:00:0100:01
Requirement already satisfied: tqdm in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from decoupler) (4.64.1)
Requirement already satisfied: typing-extensions in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from decoupler) (4.5.0)
Collecting natsort
  Using cached natsort-8.3.1-py3-none-any.whl (38 kB)
Requirement already satisfied: numpy>=1.16.5 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from anndata->decoupler) (1.24.3)
Requirement already satisfied: pandas>=1.1.1 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from anndata->decoupler) (2.0.1)
Requirement already satisfied: packaging>=20 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from anndata->decoupler) (23.1)
Requirement already satisfied: scipy>1.4 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from anndata->decoupler) (1.10.1)
Collecting h5py>=3
  Downloading h5py-3.8.0-cp39-cp39-macosx_10_9_x86_64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 10.0 MB/s eta 0:00:0000:0100:01
Collecting numpy>=1.16.5
  Downloading numpy-1.23.5-cp39-cp39-macosx_10_9_x86_64.whl (18.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.1/18.1 MB 13.1 MB/s eta 0:00:0000:0100:01
Collecting llvmlite<0.40,>=0.39.0dev0
  Downloading llvmlite-0.39.1-cp39-cp39-macosx_10_9_x86_64.whl (25.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 25.5/25.5 MB 12.1 MB/s eta 0:00:0000:0100:01
Requirement already satisfied: setuptools in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from numba->decoupler) (65.6.3)
Requirement already satisfied: pytz>=2020.1 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pandas>=1.1.1->anndata->decoupler) (2023.3)
Requirement already satisfied: tzdata>=2022.1 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pandas>=1.1.1->anndata->decoupler) (2023.3)
Requirement already satisfied: python-dateutil>=2.8.2 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from pandas>=1.1.1->anndata->decoupler) (2.8.2)
Requirement already satisfied: six>=1.5 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from python-dateutil>=2.8.2->pandas>=1.1.1->anndata->decoupler) (1.16.0)
Installing collected packages: numpy, natsort, llvmlite, numba, h5py, anndata, decoupler
  Attempting uninstall: numpy
    Found existing installation: numpy 1.24.3
    Uninstalling numpy-1.24.3:
      Successfully uninstalled numpy-1.24.3
Successfully installed anndata-0.9.1 decoupler-1.3.4 h5py-3.8.0 llvmlite-0.39.1 natsort-8.3.1 numba-0.56.4 numpy-1.23.5
Processing ./corneto-0.9.1a0-py3-none-any.whl
Requirement already satisfied: numpy<2.0,>=1.16 in /Users/johannavogenstahl/miniconda3/lib/python3.9/site-packages (from corneto==0.9.1a0) (1.23.5)
Installing collected packages: corneto
Successfully installed corneto-0.9.1a0
---------------------------------------------------------------------------
TypingError                               Traceback (most recent call last)
<ipython-input-1-8cccc3bb254a> in <module>
      5 get_ipython().system('pip install corneto-0.9.1a0-py3-none-any.whl')
      6 
----> 7 import decoupler as dc

~/opt/anaconda3/lib/python3.7/site-packages/decoupler/__init__.py in <module>
     14 from .method_udt import run_udt  # noqa: F401
     15 from .method_ora import run_ora, test1r, get_ora_df  # noqa: F401
---> 16 from .method_gsva import run_gsva  # noqa: F401
     17 from .method_gsea import run_gsea  # noqa: F401
     18 from .method_viper import run_viper  # noqa: F401

~/opt/anaconda3/lib/python3.7/site-packages/decoupler/method_gsva.py in <module>
     80 
     81 
---> 82 @nb.njit(nb.types.Tuple((nb.f4[:, :], nb.i8[:, :]))(nb.f4[:, :]), parallel=True, cache=True)
     83 def nb_get_D_I(mat):
     84     n = mat.shape[1]

~/opt/anaconda3/lib/python3.7/site-packages/numba/decorators.py in wrapper(func)
    184             with typeinfer.register_dispatcher(disp):
    185                 for sig in sigs:
--> 186                     disp.compile(sig)
    187                 disp.disable_compile()
    188         return disp

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler_lock.py in _acquire_compile_lock(*args, **kwargs)
     30         def _acquire_compile_lock(*args, **kwargs):
     31             with self:
---> 32                 return func(*args, **kwargs)
     33         return _acquire_compile_lock
     34 

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in compile(self, sig)
    691 
    692             self._cache_misses[sig] += 1
--> 693             cres = self._compiler.compile(args, return_type)
    694             self.add_overload(cres)
    695             self._cache.save_overload(sig, cres)

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in compile(self, args, return_type)
     78             return retval
     79         else:
---> 80             raise retval
     81 
     82     def _compile_cached(self, args, return_type):

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in _compile_cached(self, args, return_type)
     88 
     89         try:
---> 90             retval = self._compile_core(args, return_type)
     91         except errors.TypingError as e:
     92             self._failed_cache[key] = e

~/opt/anaconda3/lib/python3.7/site-packages/numba/dispatcher.py in _compile_core(self, args, return_type)
    106                                       args=args, return_type=return_type,
    107                                       flags=flags, locals=self.locals,
--> 108                                       pipeline_class=self.pipeline_class)
    109         # Check typing error if object mode is used
    110         if cres.typing_error is not None and not flags.enable_pyobject:

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in compile_extra(typingctx, targetctx, func, args, return_type, flags, locals, library, pipeline_class)
    970     pipeline = pipeline_class(typingctx, targetctx, library,
    971                               args, return_type, flags, locals)
--> 972     return pipeline.compile_extra(func)
    973 
    974 

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in compile_extra(self, func)
    388         self.lifted = ()
    389         self.lifted_from = None
--> 390         return self._compile_bytecode()
    391 
    392     def compile_ir(self, func_ir, lifted=(), lifted_from=None):

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in _compile_bytecode(self)
    901         """
    902         assert self.func_ir is None
--> 903         return self._compile_core()
    904 
    905     def _compile_ir(self):

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in _compile_core(self)
    888         self.define_pipelines(pm)
    889         pm.finalize()
--> 890         res = pm.run(self.status)
    891         if res is not None:
    892             # Early pipeline completion

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler_lock.py in _acquire_compile_lock(*args, **kwargs)
     30         def _acquire_compile_lock(*args, **kwargs):
     31             with self:
---> 32                 return func(*args, **kwargs)
     33         return _acquire_compile_lock
     34 

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in run(self, status)
    264                     # No more fallback pipelines?
    265                     if is_final_pipeline:
--> 266                         raise patched_exception
    267                     # Go to next fallback pipeline
    268                     else:

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in run(self, status)
    255                 try:
    256                     event("-- %s" % stage_name)
--> 257                     stage()
    258                 except _EarlyPipelineCompletion as e:
    259                     return e.result

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in stage_nopython_frontend(self)
    513                 self.args,
    514                 self.return_type,
--> 515                 self.locals)
    516             self.typemap = typemap
    517             self.return_type = return_type

~/opt/anaconda3/lib/python3.7/site-packages/numba/compiler.py in type_inference_stage(typingctx, interp, args, return_type, locals)
   1122 
   1123         infer.build_constraint()
-> 1124         infer.propagate()
   1125         typemap, restype, calltypes = infer.unify()
   1126 

~/opt/anaconda3/lib/python3.7/site-packages/numba/typeinfer.py in propagate(self, raise_errors)
    925         if errors:
    926             if raise_errors:
--> 927                 raise errors[0]
    928             else:
    929                 return errors

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<built-in function arange>) with argument(s) of type(s): (dtype=class(float32), start=int64, step=Literal[int](-1), stop=Literal[int](0))
 * parameterized
In definition 0:
    AssertionError: 
    raised from /Users/johannavogenstahl/opt/anaconda3/lib/python3.7/site-packages/numba/typing/npydecl.py:631
In definition 1:
    AssertionError: 
    raised from /Users/johannavogenstahl/opt/anaconda3/lib/python3.7/site-packages/numba/typing/npydecl.py:631
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<built-in function arange>)
[2] During: typing of call at /Users/johannavogenstahl/opt/anaconda3/lib/python3.7/site-packages/decoupler/method_gsva.py (85)


File "../../../opt/anaconda3/lib/python3.7/site-packages/decoupler/method_gsva.py", line 85:
def nb_get_D_I(mat):
    <source elided>
    n = mat.shape[1]
    rev_idx = np.abs(np.arange(start=n, stop=0, step=-1, dtype=nb.f4) - n / 2)
    ^

@PauBadiaM
Copy link
Member

HI @jvogenstahl ,
Sorry for the delayed reply. I see two problems, the first one is that pycurl does not find SSL, which is a systems's library. I guess you need to install or load this first in google colab in order to be able to use install it properly.

Warning: libcurl is configured to use SSL, but we have not been able to determine which SSL backend it is using. If your Curl is built against OpenSSL, LibreSSL, BoringSSL, GnuTLS, NSS, mbedTLS, or Secure Transport please specify the SSL backend manually. For other SSL backends please ignore this message.Not using an SSL library

The second one is about numba compiling code, you could try to update numba as suggested in this thread.

I also saw that you are using python 3.7, maybe update it to 3.10 just in case.

@pablormier, did you encounter any of this issues?

@deeenes
Copy link
Member

deeenes commented May 11, 2023

I think pycurl comes into the picture here due to pypath-omnipath, and that's not related to decoupler at all, finally we haven't used it in the tutorial at all. Feel free to remove the line

!pip install pypath-omnipath

The numba compilation error is independent and will stay around regardless. I would also highly recommend trying a more up-to-date Python, 3.10 or 3.11, and making sure all packages are up-to-date.

@pablormier
Copy link
Member

Is this problem resolved? as @deeenes said, pypath-omnipath is not required. It is also recommended to install the dependencies using the right version of each tool, as in the original notebook. The issue seems to be related to incompatible versions between packages.

@josenimo
Copy link

josenimo commented Jan 13, 2025

nudge to devs, that this issue is still happening, at least to me.
happy to provide more details to help!
tagging @PauBadiaM because not sure if they see it since issue is closed

---------------------------------------------------------------------------
TypingError                               Traceback (most recent call last)
Cell In[18], line 1
----> 1 import decoupler

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/decoupler/__init__.py:17
     15 from .method_udt import run_udt  # noqa: F401
     16 from .method_ora import run_ora, test1r, get_ora_df  # noqa: F401
---> 17 from .method_gsva import run_gsva  # noqa: F401
     18 from .method_gsea import run_gsea, get_gsea_df  # noqa: F401
     19 from .method_viper import run_viper  # noqa: F401

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/decoupler/method_gsva.py:83
     79         mat = mat_ecdf(mat)
     80     return mat
---> 83 @nb.njit(nb.types.Tuple((nb.f4[:, :], nb.i8[:, :]))(nb.f4[:, :]), parallel=True, cache=True)
     84 def nb_get_D_I(mat):
     85     n = mat.shape[1]
     86     rev_idx = np.abs(np.arange(start=n, stop=0, step=-1, dtype=nb.f4) - n / 2)

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/decorators.py:232, in _jit.<locals>.wrapper(func)
    230     with typeinfer.register_dispatcher(disp):
    231         for sig in sigs:
--> 232             disp.compile(sig)
    233         disp.disable_compile()
    234 return disp

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/dispatcher.py:905, in Dispatcher.compile(self, sig)
    903 with ev.trigger_event("numba:compile", data=ev_details):
    904     try:
--> 905         cres = self._compiler.compile(args, return_type)
    906     except errors.ForceLiteralArg as e:
    907         def folded(args, kws):

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/dispatcher.py:84, in _FunctionCompiler.compile(self, args, return_type)
     82     return retval
     83 else:
---> 84     raise retval

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/dispatcher.py:94, in _FunctionCompiler._compile_cached(self, args, return_type)
     91     pass
     93 try:
---> 94     retval = self._compile_core(args, return_type)
     95 except errors.TypingError as e:
     96     self._failed_cache[key] = e

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/dispatcher.py:107, in _FunctionCompiler._compile_core(self, args, return_type)
    104 flags = self._customize_flags(flags)
    106 impl = self._get_implementation(args, {})
--> 107 cres = compiler.compile_extra(self.targetdescr.typing_context,
    108                               self.targetdescr.target_context,
    109                               impl,
    110                               args=args, return_type=return_type,
    111                               flags=flags, locals=self.locals,
    112                               pipeline_class=self.pipeline_class)
    113 # Check typing error if object mode is used
    114 if cres.typing_error is not None and not flags.enable_pyobject:

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler.py:744, in compile_extra(typingctx, targetctx, func, args, return_type, flags, locals, library, pipeline_class)
    720 """Compiler entry point
    721 
    722 Parameter
   (...)
    740     compiler pipeline
    741 """
    742 pipeline = pipeline_class(typingctx, targetctx, library,
    743                           args, return_type, flags, locals)
--> 744 return pipeline.compile_extra(func)

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler.py:438, in CompilerBase.compile_extra(self, func)
    436 self.state.lifted = ()
    437 self.state.lifted_from = None
--> 438 return self._compile_bytecode()

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler.py:506, in CompilerBase._compile_bytecode(self)
    502 """
    503 Populate and run pipeline for bytecode input
    504 """
    505 assert self.state.func_ir is None
--> 506 return self._compile_core()

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler.py:485, in CompilerBase._compile_core(self)
    483         self.state.status.fail_reason = e
    484         if is_final_pipeline:
--> 485             raise e
    486 else:
    487     raise CompilerError("All available pipelines exhausted")

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler.py:472, in CompilerBase._compile_core(self)
    470 res = None
    471 try:
--> 472     pm.run(self.state)
    473     if self.state.cr is not None:
    474         break

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler_machinery.py:368, in PassManager.run(self, state)
    365 msg = "Failed in %s mode pipeline (step: %s)" % \
    366     (self.pipeline_name, pass_desc)
    367 patched_exception = self._patch_error(msg, e)
--> 368 raise patched_exception

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler_machinery.py:356, in PassManager.run(self, state)
    354 pass_inst = _pass_registry.get(pss).pass_inst
    355 if isinstance(pass_inst, CompilerPass):
--> 356     self._runPass(idx, pass_inst, state)
    357 else:
    358     raise BaseException("Legacy pass in use")

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler_lock.py:35, in _CompilerLock.__call__.<locals>._acquire_compile_lock(*args, **kwargs)
     32 @functools.wraps(func)
     33 def _acquire_compile_lock(*args, **kwargs):
     34     with self:
---> 35         return func(*args, **kwargs)

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler_machinery.py:311, in PassManager._runPass(self, index, pss, internal_state)
    309     mutated |= check(pss.run_initialization, internal_state)
    310 with SimpleTimer() as pass_time:
--> 311     mutated |= check(pss.run_pass, internal_state)
    312 with SimpleTimer() as finalize_time:
    313     mutated |= check(pss.run_finalizer, internal_state)

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/compiler_machinery.py:273, in PassManager._runPass.<locals>.check(func, compiler_state)
    272 def check(func, compiler_state):
--> 273     mangled = func(compiler_state)
    274     if mangled not in (True, False):
    275         msg = ("CompilerPass implementations should return True/False. "
    276                "CompilerPass with name '%s' did not.")

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/typed_passes.py:112, in BaseTypeInference.run_pass(self, state)
    106 """
    107 Type inference and legalization
    108 """
    109 with fallback_context(state, 'Function "%s" failed type inference'
    110                       % (state.func_id.func_name,)):
    111     # Type inference
--> 112     typemap, return_type, calltypes, errs = type_inference_stage(
    113         state.typingctx,
    114         state.targetctx,
    115         state.func_ir,
    116         state.args,
    117         state.return_type,
    118         state.locals,
    119         raise_errors=self._raise_errors)
    120     state.typemap = typemap
    121     # save errors in case of partial typing

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/typed_passes.py:93, in type_inference_stage(typingctx, targetctx, interp, args, return_type, locals, raise_errors)
     91     infer.build_constraint()
     92     # return errors in case of partial typing
---> 93     errs = infer.propagate(raise_errors=raise_errors)
     94     typemap, restype, calltypes = infer.unify(raise_errors=raise_errors)
     96 return _TypingResults(typemap, restype, calltypes, errs)

File ~/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/typeinfer.py:1091, in TypeInferer.propagate(self, raise_errors)
   1088 force_lit_args = [e for e in errors
   1089                   if isinstance(e, ForceLiteralArg)]
   1090 if not force_lit_args:
-> 1091     raise errors[0]
   1092 else:
   1093     raise reduce(operator.or_, force_lit_args)

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<built-in function arange>) found for signature:
 
 >>> arange(start=int64, stop=Literal[int](0), step=Literal[int](-1), dtype=class(float32))
 
There are 2 candidate implementations:
  - Of which 2 did not match due to:
  Overload in function 'np_arange': File: numba/np/arrayobj.py: Line 4760.
    With argument(s): '(start=int64, stop=int64, step=int64, dtype=class(float32))':
   Rejected as the implementation raised a specific error:
     TypingError: got some positional-only arguments passed as keyword arguments: 'start'
  raised from /Users/jnimoca/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/numba/core/typing/templates.py:783

During: resolving callee type: Function(<built-in function arange>)
During: typing of call at /Users/jnimoca/Jose_BI/4_Projects/P26_BCCN/P26E18_ProteomicAnalysis/.pixi/envs/default/lib/python3.12/site-packages/decoupler/method_gsva.py (86)


File "../.pixi/envs/default/lib/python3.12/site-packages/decoupler/method_gsva.py", line 86:
def nb_get_D_I(mat):
    <source elided>
    n = mat.shape[1]
    rev_idx = np.abs(np.arange(start=n, stop=0, step=-1, dtype=nb.f4) - n / 2)
    ^
Pixi Environment
Package                   Version       Build                    Size       Kind   Source
adjusttext                1.3.0         pyhd8ed1ab_0             17.9 KiB   conda  adjusttext
anndata                   0.11.2        pyhd8ed1ab_0             110.4 KiB  conda  anndata
appnope                   0.1.4         pyhd8ed1ab_1             9.8 KiB    conda  appnope
array-api-compat          1.10.0        pyhd8ed1ab_0             37.5 KiB   conda  array-api-compat
asttokens                 3.0.0         pyhd8ed1ab_1             27.5 KiB   conda  asttokens
brotli                    1.1.0         hd74edd7_2               19.1 KiB   conda  brotli
brotli-bin                1.1.0         hd74edd7_2               16.4 KiB   conda  brotli-bin
bzip2                     1.0.8         h99b78c6_7               120 KiB    conda  bzip2
c-ares                    1.34.4        h5505292_0               175.3 KiB  conda  c-ares
ca-certificates           2024.12.14    hf0a4a13_0               153.4 KiB  conda  ca-certificates
cached-property           1.5.2         hd8ed1ab_1               4 KiB      conda  cached-property
cached_property           1.5.2         pyha770c72_1             10.8 KiB   conda  cached_property
colorama                  0.4.6         pyhd8ed1ab_1             26.4 KiB   conda  colorama
comm                      0.2.2         pyhd8ed1ab_1             11.8 KiB   conda  comm
contourpy                 1.3.1         py312hb23fbb9_0          239.9 KiB  conda  contourpy
cycler                    0.12.1        pyhd8ed1ab_1             13.1 KiB   conda  cycler
debugpy                   1.8.11        py312hd8f9ff3_0          2.4 MiB    conda  debugpy
decorator                 5.1.1         pyhd8ed1ab_1             13.7 KiB   conda  decorator
decoupler                 1.6.0                                  301.7 KiB  pypi   decoupler-1.6.0-py3-none-any.whl
exceptiongroup            1.2.2         pyhd8ed1ab_1             20 KiB     conda  exceptiongroup
executing                 2.1.0         pyhd8ed1ab_1             27.7 KiB   conda  executing
fonttools                 4.55.3        py312h998013c_1          2.6 MiB    conda  fonttools
freetype                  2.12.1        hadb7bae_2               582.5 KiB  conda  freetype
h5py                      3.12.1        nompi_py312h34530d4_103  1.1 MiB    conda  h5py
hdf5                      1.14.4        nompi_ha698983_105       3.3 MiB    conda  hdf5
icu                       75.1          hfee45f7_0               11.3 MiB   conda  icu
importlib-metadata        8.5.0         pyha770c72_1             28 KiB     conda  importlib-metadata
ipykernel                 6.29.5        pyh57ce528_0             116.8 KiB  conda  ipykernel
ipython                   8.31.0        pyh707e725_0             586.7 KiB  conda  ipython
jedi                      0.19.2        pyhd8ed1ab_1             823.9 KiB  conda  jedi
joblib                    1.4.2         pyhd8ed1ab_1             215.1 KiB  conda  joblib
jupyter_client            8.6.3         pyhd8ed1ab_1             103.8 KiB  conda  jupyter_client
jupyter_core              5.7.2         pyh31011fe_1             56.3 KiB   conda  jupyter_core
kiwisolver                1.4.7         py312h6142ec9_0          59.5 KiB   conda  kiwisolver
krb5                      1.21.3        h237132a_0               1.1 MiB    conda  krb5
lcms2                     2.16          ha0e7c42_0               207 KiB    conda  lcms2
legacy-api-wrap           1.4.1         pyhd8ed1ab_0             14.8 KiB   conda  legacy-api-wrap
lerc                      4.0.0         h9a09cb3_0               210.7 KiB  conda  lerc
libaec                    1.1.3         hebf3989_0               27.8 KiB   conda  libaec
libblas                   3.9.0         26_osxarm64_openblas     16.3 KiB   conda  libblas
libbrotlicommon           1.1.0         hd74edd7_2               66.8 KiB   conda  libbrotlicommon
libbrotlidec              1.1.0         hd74edd7_2               27.7 KiB   conda  libbrotlidec
libbrotlienc              1.1.0         hd74edd7_2               273.1 KiB  conda  libbrotlienc
libcblas                  3.9.0         26_osxarm64_openblas     16.2 KiB   conda  libcblas
libcurl                   8.11.1        h73640d1_0               376.1 KiB  conda  libcurl
libcxx                    19.1.6        ha82da77_1               508.8 KiB  conda  libcxx
libdeflate                1.23          hec38601_0               52.9 KiB   conda  libdeflate
libedit                   3.1.20240808  pl5321hafb1f1b_0         105.1 KiB  conda  libedit
libev                     4.33          h93a5062_2               104.9 KiB  conda  libev
libexpat                  2.6.4         h286801f_0               63.2 KiB   conda  libexpat
libffi                    3.4.2         h3422bc3_5               38.1 KiB   conda  libffi
libgfortran               5.0.0         13_2_0_hd922786_3        107.6 KiB  conda  libgfortran
libgfortran5              13.2.0        hf226fd6_3               974 KiB    conda  libgfortran5
libhwloc                  2.11.2        default_hbce5d74_1001    2.2 MiB    conda  libhwloc
libiconv                  1.17          h0d3ecfb_2               660.6 KiB  conda  libiconv
libjpeg-turbo             3.0.0         hb547adb_1               534.7 KiB  conda  libjpeg-turbo
liblapack                 3.9.0         26_osxarm64_openblas     16.2 KiB   conda  liblapack
libllvm14                 14.0.6        hd1a9a77_4               19.6 MiB   conda  libllvm14
liblzma                   5.6.3         h39f12f2_1               96.8 KiB   conda  liblzma
libnghttp2                1.64.0        h6d7220d_0               553.4 KiB  conda  libnghttp2
libopenblas               0.3.28        openmp_hf332438_1        4 MiB      conda  libopenblas
libpng                    1.6.45        h3783ad8_0               257 KiB    conda  libpng
libsodium                 1.0.20        h99b78c6_0               161.1 KiB  conda  libsodium
libsqlite                 3.47.2        h3f77e49_0               830.6 KiB  conda  libsqlite
libssh2                   1.11.1        h9cc3647_0               272.5 KiB  conda  libssh2
libtiff                   4.7.0         h551f018_3               361.9 KiB  conda  libtiff
libwebp-base              1.5.0         h2471fea_0               283.2 KiB  conda  libwebp-base
libxcb                    1.17.0        hdb1d25a_0               316.1 KiB  conda  libxcb
libxml2                   2.13.5        h178c5d8_1               569.2 KiB  conda  libxml2
libzlib                   1.3.1         h8359307_2               45.3 KiB   conda  libzlib
llvm-openmp               19.1.6        hdb05f8b_0               274.7 KiB  conda  llvm-openmp
llvmlite                  0.43.0        py312ha9ca408_1          361.4 KiB  conda  llvmlite
loguru                    0.7.2         py312h81bd7bf_2          120.5 KiB  conda  loguru
markdown-it-py            3.0.0         pyhd8ed1ab_1             62.9 KiB   conda  markdown-it-py
matplotlib                3.10.0        py312h1f38498_0          16.7 KiB   conda  matplotlib
matplotlib-base           3.10.0        py312hdbc7e53_0          7.6 MiB    conda  matplotlib-base
matplotlib-inline         0.1.7         pyhd8ed1ab_1             14.1 KiB   conda  matplotlib-inline
mdurl                     0.1.2         pyhd8ed1ab_1             14.1 KiB   conda  mdurl
munkres                   1.1.4         pyh9f0ad1d_0             12.2 KiB   conda  munkres
natsort                   8.4.0         pyh29332c3_1             38.1 KiB   conda  natsort
ncurses                   6.5           h7bae524_1               783.5 KiB  conda  ncurses
nest-asyncio              1.6.0         pyhd8ed1ab_1             11.3 KiB   conda  nest-asyncio
networkx                  3.4.2         pyh267e887_2             1.2 MiB    conda  networkx
numba                     0.60.0        py312h41cea2d_0          5.4 MiB    conda  numba
numpy                     2.0.2         py312h94ee1e1_1          6.1 MiB    conda  numpy
openjpeg                  2.5.3         h8a3d83b_0               311.9 KiB  conda  openjpeg
openssl                   3.4.0         h81ee809_1               2.8 MiB    conda  openssl
p26e18_proteomicanalysis  0.1.0                                             pypi    (editable)
packaging                 24.2          pyhd8ed1ab_2             58.8 KiB   conda  packaging
pandas                    2.2.3         py312hcd31e36_1          13.8 MiB   conda  pandas
parso                     0.8.4         pyhd8ed1ab_1             73.5 KiB   conda  parso
patsy                     1.0.1         pyhd8ed1ab_1             182.2 KiB  conda  patsy
pexpect                   4.9.0         pyhd8ed1ab_1             52.3 KiB   conda  pexpect
pickleshare               0.7.5         pyhd8ed1ab_1004          11.5 KiB   conda  pickleshare
pillow                    11.1.0        py312h50aef2c_0          40.9 MiB   conda  pillow
platformdirs              4.3.6         pyhd8ed1ab_1             20 KiB     conda  platformdirs
plotly                    5.24.1        pyhd8ed1ab_1             7.7 MiB    conda  plotly
prompt-toolkit            3.0.48        pyha770c72_1             263.5 KiB  conda  prompt-toolkit
psutil                    6.1.1         py312hea69d52_0          483.8 KiB  conda  psutil
pthread-stubs             0.4           hd74edd7_1002            8.2 KiB    conda  pthread-stubs
ptyprocess                0.7.0         pyhd8ed1ab_1             19 KiB     conda  ptyprocess
pure_eval                 0.2.3         pyhd8ed1ab_1             16.3 KiB   conda  pure_eval
pygments                  2.19.1        pyhd8ed1ab_0             867.8 KiB  conda  pygments
pynndescent               0.5.13        pyhd8ed1ab_1             48.5 KiB   conda  pynndescent
pyparsing                 3.2.1         pyhd8ed1ab_0             90.9 KiB   conda  pyparsing
python                    3.12.8        hc22306f_1_cpython       12.4 MiB   conda  python
python-dateutil           2.9.0.post0   pyhff2d567_1             217.3 KiB  conda  python-dateutil
python-tzdata             2024.2        pyhd8ed1ab_1             138.9 KiB  conda  python-tzdata
python_abi                3.12          5_cp312                  6.1 KiB    conda  python_abi
pytz                      2024.1        pyhd8ed1ab_0             184.1 KiB  conda  pytz
pyzmq                     26.2.0        py312hf8a1cbd_3          353.2 KiB  conda  pyzmq
qhull                     2020.2        h420ef59_5               504.3 KiB  conda  qhull
readline                  8.2           h92ec313_1               244.5 KiB  conda  readline
rich                      13.9.4        pyhd8ed1ab_1             181.3 KiB  conda  rich
ruff                      0.9.0         py312h5d18b81_0          6.7 MiB    conda  ruff
scanpy                    1.10.4        pyhd8ed1ab_0             1.9 MiB    conda  scanpy
scikit-learn              1.6.1         py312h39203ce_0          9.3 MiB    conda  scikit-learn
scipy                     1.15.0        py312hb7ffdcd_1          15.2 MiB   conda  scipy
seaborn                   0.13.2        hd8ed1ab_3               6.7 KiB    conda  seaborn
seaborn-base              0.13.2        pyhd8ed1ab_3             222.5 KiB  conda  seaborn-base
session-info              1.0.0         pyhd8ed1ab_0             11.9 KiB   conda  session-info
setuptools                75.8.0        pyhff2d567_0             757.4 KiB  conda  setuptools
six                       1.17.0        pyhd8ed1ab_0             16 KiB     conda  six
stack_data                0.6.3         pyhd8ed1ab_1             26.4 KiB   conda  stack_data
statsmodels               0.14.4        py312h755e627_0          11.3 MiB   conda  statsmodels
stdlib-list               0.11.0        pyhd8ed1ab_1             25.7 KiB   conda  stdlib-list
tabulate                  0.9.0         pyhd8ed1ab_2             36.7 KiB   conda  tabulate
tbb                       2022.0.0      h0cbf7ec_0               115.1 KiB  conda  tbb
tenacity                  9.0.0         pyhd8ed1ab_1             24.2 KiB   conda  tenacity
threadpoolctl             3.5.0         pyhc1e730c_0             23 KiB     conda  threadpoolctl
tk                        8.6.13        h5083fa2_1               3 MiB      conda  tk
tornado                   6.4.2         py312hea69d52_0          822.8 KiB  conda  tornado
tqdm                      4.67.1        pyhd8ed1ab_1             87.4 KiB   conda  tqdm
traitlets                 5.14.3        pyhd8ed1ab_1             107.5 KiB  conda  traitlets
typing_extensions         4.12.2        pyha770c72_1             38.7 KiB   conda  typing_extensions
tzdata                    2024b         hc8b5060_0               119.5 KiB  conda  tzdata
umap-learn                0.5.7         py312h81bd7bf_0          184 KiB    conda  umap-learn
unicodedata2              15.1.0        py312h0bf5046_1          363.8 KiB  conda  unicodedata2
wcwidth                   0.2.13        pyhd8ed1ab_1             31.8 KiB   conda  wcwidth
xorg-libxau               1.0.12        h5505292_0               13.3 KiB   conda  xorg-libxau
xorg-libxdmcp             1.1.5         hd74edd7_0               18.1 KiB   conda  xorg-libxdmcp
zeromq                    4.3.5         hc1bb282_7               275 KiB    conda  zeromq
zipp                      3.21.0        pyhd8ed1ab_1             21.3 KiB   conda  zipp
zstd                      1.5.6         hb46c0d2_0               395.6 KiB  conda  zstd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants