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

Failed to build 1.4.0 from tarball #247

Closed
RSwarnkar opened this issue Dec 3, 2019 · 14 comments · Fixed by #249
Closed

Failed to build 1.4.0 from tarball #247

RSwarnkar opened this issue Dec 3, 2019 · 14 comments · Fixed by #249

Comments

@RSwarnkar
Copy link

RSwarnkar commented Dec 3, 2019

Describe the bug

Getting ValueError while installing the pmdarima using pip3.
Failed building wheel for pmdarima

To Reproduce
Steps to reproduce the behavior:
Tried installing pmdarima in termux app running on Android 9, Redmi Note 7 pro, MIUI 10.2.

pip install pmdarima

Versions

Linux-4.14.81-perf+-aarch64-with-libc Python 3.7.5 (default, Oct 23 2019, 08:30:10) [Clang 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf6
NumPy 1.17.3
SciPy 1.3.1
Expected behavior

Actual behavior

Additional context

2019-12-03T21:46:55,026 Collecting pmdarima
2019-12-03T21:46:55,028   Created temporary directory: /data/data/com.termux/files/usr/tmp/pip-unpack-5t6czeam
2019-12-03T21:46:55,062   Using cached https://files.pythonhosted.org/packages/1a/4f/6851c8d37551efcb8cfe12539f42f0f1b42a2d28a7275f1e1f6bdd6956a2/pmdarima-1.4.0.tar.gz
2019-12-03T21:46:55,208   Added pmdarima from https://files.pythonhosted.org/packages/1a/4f/6851c8d37551efcb8cfe12539f42f0f1b42a2d28a7275f1e1f6bdd6956a2/pmdarima-1.4.0.tar.gz#sha256=d91f15bc1ab700ad5587671db48e208b606a6852c71544a32af30bf4d4f69782 to build tracker '/data/data/com.termux/files/usr/tmp/pip-req-tracker-j_a7hzre'
2019-12-03T21:46:55,208     Running setup.py (path:/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py) egg_info for package pmdarima
2019-12-03T21:46:55,209     Running command python setup.py egg_info
2019-12-03T21:46:56,011     Requirements: ['Cython>=0.29', 'joblib>=0.11', 'numpy>=1.16', 'pandas>=0.19', 'scikit-learn>=0.19', 'scipy>=1.3', 'six>=1.5', 'statsmodels>=0.10.0']
2019-12-03T21:46:56,011     Adding extra setuptools args
2019-12-03T21:46:56,012     running egg_info
2019-12-03T21:46:56,013     creating /data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info
2019-12-03T21:46:56,013     writing /data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info/PKG-INFO
2019-12-03T21:46:56,014     writing dependency_links to /data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info/dependency_links.txt
2019-12-03T21:46:56,014     writing requirements to /data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info/requires.txt
2019-12-03T21:46:56,015     writing top-level names to /data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info/top_level.txt
2019-12-03T21:46:56,015     writing manifest file '/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info/SOURCES.txt'
2019-12-03T21:46:56,343     reading manifest file '/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info/SOURCES.txt'
2019-12-03T21:46:56,343     reading manifest template 'MANIFEST.in'
2019-12-03T21:46:56,347     Partial import of pmdarima during the build process.
2019-12-03T21:46:56,347     /data/data/com.termux/files/usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'configuration'
2019-12-03T21:46:56,347       warnings.warn(msg)
2019-12-03T21:46:56,348     warning: no files found matching '*.pyd' under directory 'pmdarima/__check_build'
2019-12-03T21:46:56,348     warning: no files found matching '*.so' under directory 'pmdarima/__check_build'
2019-12-03T21:46:56,348     warning: no files found matching '*.dylib' under directory 'pmdarima/__check_build'
2019-12-03T21:46:56,349     warning: no files found matching '*.dll' under directory 'pmdarima/__check_build'
2019-12-03T21:46:56,352     warning: no files found matching '*.pyd' under directory 'pmdarima/arima'
2019-12-03T21:46:56,353     warning: no files found matching '*.so' under directory 'pmdarima/arima'
2019-12-03T21:46:56,354     warning: no files found matching '*.dylib' under directory 'pmdarima/arima'
2019-12-03T21:46:56,355     warning: no files found matching '*.dll' under directory 'pmdarima/arima'
2019-12-03T21:46:56,356     warning: no files found matching '*.pyd' under directory 'pmdarima/preprocessing/exog'
2019-12-03T21:46:56,357     warning: no files found matching '*.so' under directory 'pmdarima/preprocessing/exog'
2019-12-03T21:46:56,358     warning: no files found matching '*.dylib' under directory 'pmdarima/preprocessing/exog'
2019-12-03T21:46:56,359     warning: no files found matching '*.dll' under directory 'pmdarima/preprocessing/exog'
2019-12-03T21:46:56,360     warning: no files found matching '*.pyx' under directory 'pmdarima/compat'
2019-12-03T21:46:56,361     warning: no files found matching '*.pyd' under directory 'pmdarima/compat'
2019-12-03T21:46:56,362     warning: no files found matching '*.pyx' under directory 'pmdarima/datasets'
2019-12-03T21:46:56,364     warning: no files found matching '*.pyd' under directory 'pmdarima/datasets'
2019-12-03T21:46:56,366     warning: no files found matching '*.pyx' under directory 'pmdarima/utils'
2019-12-03T21:46:56,367     warning: no files found matching '*.pyd' under directory 'pmdarima/utils'
2019-12-03T21:46:56,369     writing manifest file '/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/pip-egg-info/pmdarima.egg-info/SOURCES.txt'
2019-12-03T21:46:56,436   Source in /data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima has version 1.4.0, which satisfies requirement pmdarima from https://files.pythonhosted.org/packages/1a/4f/6851c8d37551efcb8cfe12539f42f0f1b42a2d28a7275f1e1f6bdd6956a2/pmdarima-1.4.0.tar.gz#sha256=d91f15bc1ab700ad5587671db48e208b606a6852c71544a32af30bf4d4f69782
2019-12-03T21:46:56,438   Removed pmdarima from https://files.pythonhosted.org/packages/1a/4f/6851c8d37551efcb8cfe12539f42f0f1b42a2d28a7275f1e1f6bdd6956a2/pmdarima-1.4.0.tar.gz#sha256=d91f15bc1ab700ad5587671db48e208b606a6852c71544a32af30bf4d4f69782 from build tracker '/data/data/com.termux/files/usr/tmp/pip-req-tracker-j_a7hzre'
2019-12-03T21:46:56,531 Requirement already satisfied: Cython>=0.29 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pmdarima) (0.29.14)
2019-12-03T21:46:56,538 Requirement already satisfied: joblib>=0.11 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pmdarima) (0.14.0)
2019-12-03T21:46:56,545 Requirement already satisfied: numpy>=1.16 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pmdarima) (1.17.3)
2019-12-03T21:46:56,551 Requirement already satisfied: pandas>=0.19 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pmdarima) (0.25.3)
2019-12-03T21:46:56,573 Requirement already satisfied: scikit-learn>=0.19 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pmdarima) (0.21.3)
2019-12-03T21:46:56,590 Requirement already satisfied: scipy>=1.3 in /data/data/com.termux/files/usr/lib/python3.7/site-packages/scipy-1.3.1-py3.7-linux-aarch64.egg (from pmdarima) (1.3.1)
2019-12-03T21:46:56,596 Requirement already satisfied: six>=1.5 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pmdarima) (1.12.0)
2019-12-03T21:46:56,601 Requirement already satisfied: statsmodels>=0.10.0 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pmdarima) (0.10.1)
2019-12-03T21:46:56,640 Requirement already satisfied: pytz>=2017.2 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pandas>=0.19->pmdarima) (2019.3)
2019-12-03T21:46:56,649 Requirement already satisfied: python-dateutil>=2.6.1 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from pandas>=0.19->pmdarima) (2.8.1)
2019-12-03T21:46:56,659 Requirement already satisfied: patsy>=0.4.0 in /data/data/com.termux/files/usr/lib/python3.7/site-packages (from statsmodels>=0.10.0->pmdarima) (0.5.1)
2019-12-03T21:46:56,670 Building wheels for collected packages: pmdarima
2019-12-03T21:46:56,671   Created temporary directory: /data/data/com.termux/files/usr/tmp/pip-wheel-vcnsyaf2
2019-12-03T21:46:56,672   Destination directory: /data/data/com.termux/files/usr/tmp/pip-wheel-vcnsyaf2
2019-12-03T21:46:56,672   Running command /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /data/data/com.termux/files/usr/tmp/pip-wheel-vcnsyaf2 --python-tag cp37
2019-12-03T21:46:57,170   Partial import of pmdarima during the build process.
2019-12-03T21:46:57,170   Requirements: ['Cython>=0.29', 'joblib>=0.11', 'numpy>=1.16', 'pandas>=0.19', 'scikit-learn>=0.19', 'scipy>=1.3', 'six>=1.5', 'statsmodels>=0.10.0']
2019-12-03T21:46:57,171   Adding extra setuptools args
2019-12-03T21:46:58,511   Traceback (most recent call last):
2019-12-03T21:46:58,511     File "<string>", line 1, in <module>
2019-12-03T21:46:58,512     File "/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py", line 250, in <module>
2019-12-03T21:46:58,512       do_setup()
2019-12-03T21:46:58,512     File "/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py", line 246, in do_setup
2019-12-03T21:46:58,512       setup(**metadata)
2019-12-03T21:46:58,512     File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/core.py", line 137, in setup
2019-12-03T21:46:58,513       config = configuration()
2019-12-03T21:46:58,513     File "/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py", line 164, in configuration
2019-12-03T21:46:58,513       config.add_subpackage(DISTNAME)
2019-12-03T21:46:58,514     File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
2019-12-03T21:46:58,515       caller_level = 2)
2019-12-03T21:46:58,515     File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1004, in get_subpackage
2019-12-03T21:46:58,515       caller_level = caller_level + 1)
2019-12-03T21:46:58,515     File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py
2019-12-03T21:46:58,516       config = setup_module.configuration(*args)
2019-12-03T21:46:58,516     File "pmdarima/setup.py", line 36, in configuration
2019-12-03T21:46:58,516       config.add_subpackage('model_selection/tests')
2019-12-03T21:46:58,516     File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
2019-12-03T21:46:58,517       caller_level = 2)
2019-12-03T21:46:58,517     File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 997, in get_subpackage
2019-12-03T21:46:58,517       caller_level = caller_level+1)
2019-12-03T21:46:58,517     File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 779, in __init__
2019-12-03T21:46:58,518       raise ValueError("%r is not a directory" % (package_path,))
2019-12-03T21:46:58,518   ValueError: 'pmdarima/model_selection/tests' is not a directory
2019-12-03T21:46:58,616   ERROR: Failed building wheel for pmdarima
2019-12-03T21:46:58,619   Running setup.py clean for pmdarima
2019-12-03T21:46:58,621   Running command /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
2019-12-03T21:46:59,348   Partial import of pmdarima during the build process.
2019-12-03T21:46:59,350   Requirements: ['Cython>=0.29', 'joblib>=0.11', 'numpy>=1.16', 'pandas>=0.19', 'scikit-learn>=0.19', 'scipy>=1.3', 'six>=1.5', 'statsmodels>=0.10.0']
2019-12-03T21:46:59,397   running clean
2019-12-03T21:46:59,403   'build/lib' does not exist -- can't clean it
2019-12-03T21:46:59,404   'build/bdist.linux-aarch64' does not exist -- can't clean it
2019-12-03T21:46:59,405   'build/scripts-3.7' does not exist -- can't clean it
2019-12-03T21:46:59,406   Removing directory: __pycache__
2019-12-03T21:46:59,408   Removing directory: __pycache__
2019-12-03T21:46:59,409   Removing directory: __pycache__
2019-12-03T21:46:59,411   Removing directory: __pycache__
2019-12-03T21:46:59,449 Failed to build pmdarima
2019-12-03T21:47:00,195 Installing collected packages: pmdarima
2019-12-03T21:47:00,196   Created temporary directory: /data/data/com.termux/files/usr/tmp/pip-record-hqdqajee
2019-12-03T21:47:00,197     Running command /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-hqdqajee/install-record.txt --single-version-externally-managed --compile
2019-12-03T21:47:00,713     Partial import of pmdarima during the build process.
2019-12-03T21:47:00,713     Requirements: ['Cython>=0.29', 'joblib>=0.11', 'numpy>=1.16', 'pandas>=0.19', 'scikit-learn>=0.19', 'scipy>=1.3', 'six>=1.5', 'statsmodels>=0.10.0']
2019-12-03T21:47:00,713     Adding extra setuptools args
2019-12-03T21:47:01,542     Traceback (most recent call last):
2019-12-03T21:47:01,542       File "<string>", line 1, in <module>
2019-12-03T21:47:01,542       File "/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py", line 250, in <module>
2019-12-03T21:47:01,542         do_setup()
2019-12-03T21:47:01,542       File "/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py", line 246, in do_setup
2019-12-03T21:47:01,542         setup(**metadata)
2019-12-03T21:47:01,542       File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/core.py", line 137, in setup
2019-12-03T21:47:01,542         config = configuration()
2019-12-03T21:47:01,543       File "/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py", line 164, in configuration
2019-12-03T21:47:01,543         config.add_subpackage(DISTNAME)
2019-12-03T21:47:01,543       File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
2019-12-03T21:47:01,543         caller_level = 2)
2019-12-03T21:47:01,544       File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1004, in get_subpackage
2019-12-03T21:47:01,544         caller_level = caller_level + 1)
2019-12-03T21:47:01,544       File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py
2019-12-03T21:47:01,544         config = setup_module.configuration(*args)
2019-12-03T21:47:01,545       File "pmdarima/setup.py", line 36, in configuration
2019-12-03T21:47:01,545         config.add_subpackage('model_selection/tests')
2019-12-03T21:47:01,545       File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
2019-12-03T21:47:01,545         caller_level = 2)
2019-12-03T21:47:01,545       File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 997, in get_subpackage
2019-12-03T21:47:01,546         caller_level = caller_level+1)
2019-12-03T21:47:01,546       File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 779, in __init__
2019-12-03T21:47:01,546         raise ValueError("%r is not a directory" % (package_path,))
2019-12-03T21:47:01,546     ValueError: 'pmdarima/model_selection/tests' is not a directory
2019-12-03T21:47:01,644 Cleaning up...
2019-12-03T21:47:01,644   Removing source in /data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima
2019-12-03T21:47:01,653 Removed build tracker '/data/data/com.termux/files/usr/tmp/pip-req-tracker-j_a7hzre'
2019-12-03T21:47:01,653 ERROR: Command errored out with exit status 1: /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-hqdqajee/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
2019-12-03T21:47:01,654 Exception information:
2019-12-03T21:47:01,654 Traceback (most recent call last):
2019-12-03T21:47:01,654   File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
2019-12-03T21:47:01,654     status = self.run(options, args)
2019-12-03T21:47:01,654   File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 455, in run
2019-12-03T21:47:01,654     use_user_site=options.use_user_site,
2019-12-03T21:47:01,654   File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 62, in install_given_reqs
2019-12-03T21:47:01,654     **kwargs
2019-12-03T21:47:01,654   File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 888, in install
2019-12-03T21:47:01,654     cwd=self.unpacked_source_directory,
2019-12-03T21:47:01,654   File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 275, in runner
2019-12-03T21:47:01,654     spinner=spinner,
2019-12-03T21:47:01,654   File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 242, in call_subprocess
2019-12-03T21:47:01,654     raise InstallationError(exc_msg)
2019-12-03T21:47:01,654 pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-lf0h5m6i/pmdarima/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-hqdqajee/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
@RSwarnkar
Copy link
Author

I am not sure if the logs generated while logging bug is same. Hence attaching the verbose log.
error.txt

@televi
Copy link

televi commented Dec 3, 2019

I've have the same problem trying to build pmdarima on CentOS from the version v1.4.0 sdist on Pypi.

The issue is that the sdist on Pypi doesn't include pmdarima/model_selection/tests - I verified this by simply downloading the sdist via pip download --no-binary=pmdarima --no-deps pmdarima==1.4.0 and then untar-gzipping it and looking in the resulting directory.

The problem seems related to #201 - it added model_selection/tests to pmdarima/setup.py. When I download the v1.3.0 sdist, that code isn't there and I can build just fine.

When I clone the repo and run python setup.py sdist on master, the resulting tar.gz file does not include anything from the pmdarima/model_selection directory - same when I do that with v1.4.0 checked out.

I was able to get the required files included in the sdist by adding recursive-include pmdarima/model_selection * to MANIFEST.in and then building the sdist - I have no idea if that's right or wrong but it did work.

@tgsmith61591
Copy link
Member

Thanks for sleuthing that out @televi we will get this patched and released with 1.5.0 at the end of this week

@RSwarnkar
Copy link
Author

Thanks guys, I'll look forward.

@tgsmith61591
Copy link
Member

Just merged a fix for this. If you want to test it immediately, you can try cloning the repo and running:

# if you don't already have Cython and Numpy, you'll need them:
pip install "cython>=0.29" "numpy>=1.16"

# make the sdist
python setup.py sdist

# install from sdist (version is managed by tag in CI/CD)
pip install dist/pmdarima-0.0.0.tar.gz

This has been tested and shown to work on Mac and Linux, but we have an open task to get a CI/CD check for sdist installation into our Windows CI pipeline. The 1.5.0 release is going to happen tomorrow, so hopefully everything is resolved by then.

@tgsmith61591 tgsmith61591 changed the title Failed to build on python 3.7.5 termux 0.76 Failed to build 1.4.0 from tarball Dec 5, 2019
@RSwarnkar
Copy link
Author

Hello @tgsmith61591 thanks for pre release help. Build and install was succes but got error while importing module this time. Error screenshot. I will wait till release.
Screenshot_2019-12-05-19-46-41-892_com termux

@tgsmith61591
Copy link
Member

tgsmith61591 commented Dec 5, 2019

Cool, thanks for the follow-up @RSwarnkar. The reason for that is you probably tried the import inside of the cloned pmdarima directory, which will try to import the development version from the package tree. (Python finds the __init__.py in the folder called pmdarima and tries to import the local package before the site-packages-installed one). That's an error message we actually explicitly write so people working on dev versions make sure they have the shared objects in their dev source tree. If you imported in a different directory, I'd imagine it would work. I.e.,

cd dist/
python -c 'import pmdarima'

But at least we're past the breaking install :) Looks like 1.5.0 should clear up your issues.

@televi
Copy link

televi commented Dec 6, 2019

I pulled the 1.5.1 sdist and built a wheel from it so this problem is fixed for me as well.

One thing that I do see (should probably be another issue and an enhancement): there isn't a pyproject.toml file included, so if I try to build pmdarima in a fresh venv that has just pip, setuptools and wheel, it will fail hard. I think this can be trivially fixed by addding a pyproject.toml file with [build-system] section that has

requires = [
    "setuptools",
    "wheel",
    "Cpython",
    "numpy",
    "scipy",
]

I'll give that a try but would you be willing to implement something like that?

@tgsmith61591
Copy link
Member

@televi what environment are you in? Our manylinux wheels should cover most, unless you're in a non-standard environment. For example, when I run a fresh docker container and try to install, it will grab the right wheel file and install:

$ docker run --rm -it python:3.7 /bin/bash
root@84b6ea3aa7c3:/# pip install pmdarima
Collecting pmdarima
  Downloading https://files.pythonhosted.org/packages/87/3c/c70327cae80a30a9f78c0c4b12a30a0f28ec1a1eeb5303153653e7b26481/pmdarima-1.5.1-cp37-cp37m-manylinux1_x86_64.whl (1.4MB)
     |████████████████████████████████| 1.4MB 2.8MB/s
Collecting Cython>=0.29
  Downloading https://files.pythonhosted.org/packages/d8/58/2deb24de3c10cc4c0f09639b46f4f4b50059f0fdc785128a57dd9fdce026/Cython-0.29.14-cp37-cp37m-manylinux1_x86_64.whl (2.1MB)
     |████████████████████████████████| 2.1MB 7.4MB/s
Collecting scikit-learn>=0.19
  Downloading https://files.pythonhosted.org/packages/19/96/8034e350d4550748277e514d0d6d91bdd36be19e6c5f40b8af0d74cb0c84/scikit_learn-0.22-cp37-cp37m-manylinux1_x86_64.whl (7.0MB)
     |████████████████████████████████| 7.0MB 4.2MB/s
Collecting six>=1.5
  Downloading https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Collecting scipy>=1.3
  Downloading https://files.pythonhosted.org/packages/f2/18/f788042dc7a73d0176e073909c00a6765c953986cae6d8cc13782a4bcd05/scipy-1.3.3-cp37-cp37m-manylinux1_x86_64.whl (25.2MB)
     |████████████████████████████████| 25.2MB 10.6MB/s
Collecting pandas>=0.19
  Downloading https://files.pythonhosted.org/packages/63/e0/a1b39cdcb2c391f087a1538bc8a6d62a82d0439693192aef541d7b123769/pandas-0.25.3-cp37-cp37m-manylinux1_x86_64.whl (10.4MB)
     |████████████████████████████████| 10.4MB 19.0MB/s
Collecting pathlib
  Downloading https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz (49kB)
     |████████████████████████████████| 51kB 6.4MB/s
Collecting numpy>=1.16
  Downloading https://files.pythonhosted.org/packages/9b/af/4fc72f9d38e43b092e91e5b8cb9956d25b2e3ff8c75aed95df5569e4734e/numpy-1.17.4-cp37-cp37m-manylinux1_x86_64.whl (20.0MB)
     |████████████████████████████████| 20.0MB 950kB/s
Collecting joblib>=0.11
  Downloading https://files.pythonhosted.org/packages/8f/42/155696f85f344c066e17af287359c9786b436b1bf86029bb3411283274f3/joblib-0.14.0-py2.py3-none-any.whl (294kB)
     |████████████████████████████████| 296kB 16.6MB/s
Collecting statsmodels>=0.10.0
  Downloading https://files.pythonhosted.org/packages/a6/32/5f8cff131e678a73b8f390ff7d8a04d502ed45e379378a0c5b9c25175239/statsmodels-0.10.2-cp37-cp37m-manylinux1_x86_64.whl (8.1MB)
     |████████████████████████████████| 8.1MB 2.1MB/s
Collecting python-dateutil>=2.6.1
  Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
     |████████████████████████████████| 235kB 5.2MB/s
Collecting pytz>=2017.2
  Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB)
     |████████████████████████████████| 512kB 4.6MB/s
Collecting patsy>=0.4.0
  Downloading https://files.pythonhosted.org/packages/ea/0c/5f61f1a3d4385d6bf83b83ea495068857ff8dfb89e74824c6e9eb63286d8/patsy-0.5.1-py2.py3-none-any.whl (231kB)
     |████████████████████████████████| 235kB 6.3MB/s
Building wheels for collected packages: pathlib
  Building wheel for pathlib (setup.py) ... done
  Created wheel for pathlib: filename=pathlib-1.0.1-cp37-none-any.whl size=14348 sha256=c63e59eac11035b3850731e4913120805d604e5d95b3372754baea274986dba7
  Stored in directory: /root/.cache/pip/wheels/f9/b2/4a/68efdfe5093638a9918bd1bb734af625526e849487200aa171
Successfully built pathlib
Installing collected packages: Cython, joblib, numpy, scipy, scikit-learn, six, python-dateutil, pytz, pandas, pathlib, patsy, statsmodels, pmdarima
Successfully installed Cython-0.29.14 joblib-0.14.0 numpy-1.17.4 pandas-0.25.3 pathlib-1.0.1 patsy-0.5.1 pmdarima-1.5.1 python-dateutil-2.8.1 pytz-2019.3 scikit-learn-0.22 scipy-1.3.3 six-1.13.0 statsmodels-0.10.2
root@84b6ea3aa7c3:/# python -c 'import pmdarima as pm; print(pm.__version__)'
1.5.1
root@84b6ea3aa7c3:/#

You are correct that if you build from sdist, you'll need numpy and Cython, because it will need to build the .so files. I'm not opposed to adding a pyproject.toml by any means, but want to make sure I have all the info I need and (ideally) a reproducible environment that I can use to test it.

@televi
Copy link

televi commented Dec 6, 2019

@tgsmith61591 We're not allowed to use vendored wheels so we have to build everything from source (when it comes to FOSS at least).

FYI, the environment I use to build is just a venv, e.g.

python3.7 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip wheel setuptools
pip wheel --global-option build_ext pmdarima

If a package (like pmdarima but there are some others too) doesn't include in its sdist what is required to build (via pyproject.toml, for example), then the above simply fails. What we're doing is relatively complex so we have hundreds of FOSS packages we build and then keep a copy of the resulting build artifact (for things like routine security scanning or proving to a customer that we can reproduce our software even if the FOSS we use were to be removed or somehow compromised). Having things not build using the above means we have to do a bunch of exception processing to get it built. It's not earth ending - just kind of annoying when I trip over it 😃

I know scipy (for example) has converted to using pyproject.toml so that may be a reasonable reference for pmdarima?

@tgsmith61591
Copy link
Member

tgsmith61591 commented Dec 6, 2019

I gotcha @televi I think this is something we could accommodate. Bummer that you can't use binary dists but I understand how that goes :) We'll try to get this into the next release

@RSwarnkar
Copy link
Author

RSwarnkar commented Dec 7, 2019

Hello, This time installation was successful but while import I am getting
ImportError: cannot import name 'SemLock' from _multiprocessing

I guess this is a bug with Android platform. Android does not supports multiprocessing APIs.
Hence can't use pmdarima on android as of now.

Thank you for fixing the build anyways.

@tgsmith61591
Copy link
Member

In this thread it looks like there could be a way around it:
asciinema/asciinema#271

I'll read a bit more. I get the impression rewriting a parallel task with the threading library would be highly non-trivial

@tgsmith61591
Copy link
Member

What we may be able to do however is lazily load joblib, and if you are on a platform that doesn't support it, we could just enforce that you must use stepwise=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants