Sktime: Advanced installation docs out-of-date

Created on 10 Oct 2020  路  4Comments  路  Source: alan-turing-institute/sktime

I am bit new to open source and sktime is the first project that I am aiming to contribute to, so please forgive if this is my inexperience but following the development intructions, I am able to step through all them except this last and important one.
where I get the following error. I have also checked if I have gcc installed by trying following in the terminal gcc -vand all looks good.

So I am unsure of whats wrong here ?

(sktime) (base) Shoaibs-MBP:sktime shoaibkhan$ env CC=$(which gcc-9) CXX=$(which g++-9) pip install --editable .
Obtaining file:///Users/shoaibkhan/PycharmProjects/sktime
Requirement already satisfied: numpy>=1.18.0 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from sktime==0.4.2) (1.19.2)
Requirement already satisfied: pandas>=1.0.0 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from sktime==0.4.2) (1.1.3)
Requirement already satisfied: scikit-learn>=0.23.0 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from sktime==0.4.2) (0.23.2)
Requirement already satisfied: statsmodels>=0.12.0 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from sktime==0.4.2) (0.12.0)
Requirement already satisfied: wheel in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from sktime==0.4.2) (0.35.1)
Requirement already satisfied: pytz>=2017.2 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from pandas>=1.0.0->sktime==0.4.2) (2020.1)
Requirement already satisfied: python-dateutil>=2.7.3 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from pandas>=1.0.0->sktime==0.4.2) (2.8.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from scikit-learn>=0.23.0->sktime==0.4.2) (2.1.0)
Requirement already satisfied: scipy>=0.19.1 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from scikit-learn>=0.23.0->sktime==0.4.2) (1.5.2)
Requirement already satisfied: joblib>=0.11 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from scikit-learn>=0.23.0->sktime==0.4.2) (0.17.0)
Requirement already satisfied: patsy>=0.5 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from statsmodels>=0.12.0->sktime==0.4.2) (0.5.1)
Requirement already satisfied: six>=1.5 in /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages (from python-dateutil>=2.7.3->pandas>=1.0.0->sktime==0.4.2) (1.15.0)
Installing collected packages: sktime
  Attempting uninstall: sktime
    Found existing installation: sktime 0.4.2
    Uninstalling sktime-0.4.2:
      Successfully uninstalled sktime-0.4.2
  Running setup.py develop for sktime
    ERROR: Command errored out with exit status 1:
     command: /Users/shoaibkhan/venv/sktime/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/shoaibkhan/PycharmProjects/sktime/setup.py'"'"'; __file__='"'"'/Users/shoaibkhan/PycharmProjects/sktime/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /Users/shoaibkhan/PycharmProjects/sktime/
    Complete output (44 lines):
    C compiler: -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64

    compile options: '-c'
    extra options: '-fopenmp'
    -Wno-unused-result: test_openmp.c
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/shoaibkhan/PycharmProjects/sktime/setup.py", line 319, in <module>
        setup_package()
      File "/Users/shoaibkhan/PycharmProjects/sktime/setup.py", line 315, in setup_package
        setup(**metadata)
      File "/Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/Users/shoaibkhan/PycharmProjects/sktime/setup.py", line 210, in configuration
        config.add_subpackage("sktime")
      File "/Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 1018, in add_subpackage
        config_list = self.get_subpackage(subpackage_name, subpackage_path,
      File "/Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 984, in get_subpackage
        config = self._get_configuration_from_setup_py(
      File "/Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/numpy/distutils/misc_util.py", line 926, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "sktime/setup.py", line 28, in configuration
        maybe_cythonize_extensions(top_path, config)
      File "/Users/shoaibkhan/PycharmProjects/sktime/sktime/_build_utils/__init__.py", line 42, in maybe_cythonize_extensions
        with_openmp = check_openmp_support()
      File "/Users/shoaibkhan/PycharmProjects/sktime/sktime/_build_utils/openmp_helpers.py", line 145, in check_openmp_support
        raise CompileError(err_message)
    distutils.errors.CompileError:
                        ***
    It seems that sktime cannot be built with OpenMP support.

    - If your compiler supports OpenMP but the build still fails, please
      submit a bug report at:
      'https://github.com/alan-turing-institute/sktime/issues'

    - If you want to build sktime without OpenMP support, you can set
      the environment variable SKTIME_NO_OPENMP and rerun the build
      command. Note however that some estimators will run in sequential
      mode and their `n_jobs` parameter will have no effect anymore.

    - See sktime advanced installation instructions for more info:
      'https://https://www.sktime.org/en/latest/installation.html'
                        ***

    ----------------------------------------
  Rolling back uninstall of sktime
  Moving to /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/sktime-0.4.2.dist-info/
   from /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/~ktime-0.4.2.dist-info
  Moving to /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/sktime/
   from /Users/shoaibkhan/venv/sktime/lib/python3.8/site-packages/~ktime
ERROR: Command errored out with exit status 1: /Users/shoaibkhan/venv/sktime/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/shoaibkhan/PycharmProjects/sktime/setup.py'"'"'; __file__='"'"'/Users/shoaibkhan/PycharmProjects/sktime/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

documentation good first issue

Most helpful comment

Sure, I will update the docs and open a PR

All 4 comments

Hi @shoaibkhanz, assuming that you're on macOS, have you read and followed the macOS specific instructions: https://www.sktime.org/en/latest/installation.html#mac-osx?

Yes I was following the instructions from the above documentation link.
However, what worked for me is using the conda environment instead of venv
followed instructions from here -- > https://scikit-learn.org/stable/developers/advanced_installation.html#macos-compilers-from-conda-forge

Great, would be great to update the installation docs in docs/source/installation.rst

Sure, I will update the docs and open a PR

Was this page helpful?
0 / 5 - 0 ratings