I have found a package in GitHub which can clearly tell the time complexity of a python code, The link for the package that I have found in GitHub is here. I tried installing it in my PC using "pip install time_complexity_estimator" but I ended up with some errors.
Someone please tell me how to install it.
The reply from my command prompt is follows :
Collecting time_complexity_estimator
Using cached time_complexity_estimator-0.3.tar.gz (12 kB)
Preparing metadata (setup.py) ... done
Collecting numpy==1.11.3
Using cached numpy-1.11.3.zip (4.7 MB)
Preparing metadata (setup.py) ... done
Collecting scipy==0.18.1
Using cached scipy-0.18.1.zip (14.6 MB)
Preparing metadata (setup.py) ... done
Installing collected packages: scipy, numpy, time_complexity_estimator
Attempting uninstall: scipy
Found existing installation: scipy 1.8.0
Uninstalling scipy-1.8.0:
Successfully uninstalled scipy-1.8.0
DEPRECATION: scipy is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for scipy ... error
error: subprocess-exited-with-error
× Running setup.py install for scipy did not run successfully.
│ exit code: 1
╰─> [142 lines of output]
C:\Users\sanja\AppData\Local\Temp\pip-install-xchf9ate\scipy_18ce00d69bde46538e9e7da6667a7b99\setup.py:115: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import imp
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
INFO: lapack_opt_info:
INFO: lapack_armpl_info:
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
INFO: libraries armpl_lp64_mp not found in ['C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\libs']
INFO: NOT AVAILABLE
INFO:
INFO: lapack_mkl_info:
INFO: libraries mkl_rt not found in ['C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\libs']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_lapack_info:
INFO: libraries openblas not found in ['C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\libs']
INFO: get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
INFO: customize GnuFCompiler
WARN: Could not locate executable g77
WARN: Could not locate executable f77
INFO: customize IntelVisualFCompiler
WARN: Could not locate executable ifort
WARN: Could not locate executable ifl
INFO: customize AbsoftFCompiler
WARN: Could not locate executable f90
INFO: customize CompaqVisualFCompiler
WARN: Could not locate executable DF
INFO: customize IntelItaniumVisualFCompiler
WARN: Could not locate executable efl
INFO: customize Gnu95FCompiler
WARN: Could not locate executable gfortran
WARN: Could not locate executable f95
INFO: customize G95FCompiler
WARN: Could not locate executable g95
INFO: customize IntelEM64VisualFCompiler
INFO: customize IntelEM64TFCompiler
WARN: Could not locate executable efort
WARN: Could not locate executable efc
INFO: customize PGroupFlangCompiler
WARN: Could not locate executable flang
WARN: don't know how to compile Fortran code on platform 'nt'
INFO: NOT AVAILABLE
INFO:
INFO: openblas_clapack_info:
INFO: libraries openblas,lapack not found in ['C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\libs']
INFO: NOT AVAILABLE
INFO:
INFO: flame_info:
INFO: libraries flame not found in ['C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\libs']
INFO: NOT AVAILABLE
INFO:
INFO: accelerate_info:
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries tatlas,tatlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib
INFO: libraries tatlas,tatlas not found in C:\
INFO: libraries tatlas,tatlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\libs
INFO: <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_info:
INFO: libraries satlas,satlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib
INFO: libraries satlas,satlas not found in C:\
INFO: libraries satlas,satlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\libs
INFO: <class 'numpy.distutils.system_info.atlas_3_10_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries ptf77blas,ptcblas,atlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib
INFO: libraries ptf77blas,ptcblas,atlas not found in C:\
INFO: libraries ptf77blas,ptcblas,atlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\libs
INFO: <class 'numpy.distutils.system_info.atlas_threads_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_info:
INFO: libraries f77blas,cblas,atlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib
INFO: libraries f77blas,cblas,atlas not found in C:\
INFO: libraries f77blas,cblas,atlas not found in C:\Users\sanja\AppData\Local\Programs\Python\Python310\libs
INFO: <class 'numpy.distutils.system_info.atlas_info'>
INFO: NOT AVAILABLE
INFO:
INFO: lapack_info:
INFO: libraries lapack not found in ['C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\sanja\\AppData\\Local\\Programs\\Python\\Python310\\libs']
INFO: NOT AVAILABLE
INFO:
C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\system_info.py:1902: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
INFO: lapack_src_info:
INFO: NOT AVAILABLE
INFO:
C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\system_info.py:1902: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
INFO: NOT AVAILABLE
INFO:
Running from scipy source directory.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\sanja\AppData\Local\Temp\pip-install-xchf9ate\scipy_18ce00d69bde46538e9e7da6667a7b99\setup.py", line 415, in <module>
setup_package()
File "C:\Users\sanja\AppData\Local\Temp\pip-install-xchf9ate\scipy_18ce00d69bde46538e9e7da6667a7b99\setup.py", line 411, in setup_package
setup(**metadata)
File "C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "C:\Users\sanja\AppData\Local\Temp\pip-install-xchf9ate\scipy_18ce00d69bde46538e9e7da6667a7b99\setup.py", line 335, in configuration
config.add_subpackage('scipy')
File "C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\misc_util.py", line 1054, in add_subpackage
config_list = self.get_subpackage(subpackage_name, subpackage_path,
File "C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\misc_util.py", line 1020, in get_subpackage
config = self._get_configuration_from_setup_py(
File "C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\misc_util.py", line 962, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "C:\Users\sanja\AppData\Local\Temp\pip-install-xchf9ate\scipy_18ce00d69bde46538e9e7da6667a7b99\scipy\setup.py", line 15, in configuration
config.add_subpackage('linalg')
File "C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\misc_util.py", line 1054, in add_subpackage
config_list = self.get_subpackage(subpackage_name, subpackage_path,
File "C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\misc_util.py", line 1020, in get_subpackage
config = self._get_configuration_from_setup_py(
File "C:\Users\sanja\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\distutils\misc_util.py", line 962, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "C:\Users\sanja\AppData\Local\Temp\pip-install-xchf9ate\scipy_18ce00d69bde46538e9e7da6667a7b99\scipy\linalg\setup.py", line 20, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of scipy
Moving to c:\users\sanja\appdata\local\programs\python\python310\lib\site-packages\scipy-1.8.0.dist-info\
from C:\Users\sanja\AppData\Local\Programs\Python\Python310\Lib\site-packages\~cipy-1.8.0.dist-info
Moving to c:\users\sanja\appdata\local\programs\python\python310\lib\site-packages\scipy\
from C:\Users\sanja\AppData\Local\Programs\Python\Python310\Lib\site-packages\~cipy
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> scipy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Welcome to stack overflow!
I think this is a bug on the developer's end, not yours. I tried running it and I got the same result. I also tried cloning the repository manually and using the setup.py file, but that also threw me an error.
I've posted an issue on the repository to alert the developer's that this is happening. I recommend you do the same, since it might grab more attention. Otherwise, I'm not sure what to suggest. I apologize if this isn't the answer you're looking for!
Edit: this is what I got, and based on our similar experiences, I think that it is an issue on our end. It could not be, it might just be a coincidence, so I'd also ask a friend to see if they can install the module.