https://pantsbuild.org/ logo
#general
Title
# general
r

refined-addition-53644

03/16/2022, 5:07 PM
Hi everyone! I am having issue with
prophet
which has dependency on
pystan
when running tests using pants. Please see the ๐Ÿงต
Copy code
./pants test ::
18:07:44.08 [INFO] Completed: Run Pytest - src/pyfleet-etl/tests/test_pyfleet_etl.py:../tests succeeded.
18:08:04.33 [INFO] Completed: Building requirements.pex with 18 requirements: PyYAML==6.0, SQLAlchemy==1.4.28, Unidecode==1.3.2, awswrangler==2.13.0, dynamic-yaml==1.3.0, fastapi==0.70.0, loguru==0.5.3, mangum==0.12.3, numpy==1.22... (152 characters truncated)
18:08:04.35 [ERROR] 1 Exception encountered:

  ProcessExecutionFailure: Process 'Building requirements.pex with 18 requirements: PyYAML==6.0, SQLAlchemy==1.4.28, Unidecode==1.3.2, awswrangler==2.13.0, dynamic-yaml==1.3.0, fastapi==0.70.0, loguru==0.5.3, mangum==0.12.3, numpy==1.22.1, pandas==1.3.4, prophet==1.0.1, pydantic==1.8.2, pytest==6.2.5, python-jose==3.3.0, python-multipart==0.0.5, spacy==3.2.1, starlette, uvicorn==0.16.0' failed with exit code 1.
stdout:

stderr:
WARNING: Discarding <https://files.pythonhosted.org/packages/10/9f/dcecf31ac08842a675ec337a14439b37d75f6da42f034b1fd5eb90b10b84/pystan-2.19.1.1.tar.gz#sha256=fa8bad8dbc0da22bbe6f36af56c9abbfcf10f92df8ce627d59a36bd8d25eb038> (from <https://pypi.org/simple/pystan/>). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pystan~=2.19.1.1 (from prophet)
ERROR: No matching distribution found for pystan~=2.19.1.1
pid 45815 -> /Users/developer/.cache/pants/named_caches/pex_root/venvs/7f518a293766277276f42aa896ce105b056e5634/e71d629be3a6ea3a6f56ecf6ab99197464cf6f7c/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/developer/.cache/pants/named_caches/pex_root --log /private/var/folders/9w/9_4n35r57d707zkrk86rvh9w0000gn/T/process-execution76XQc1/.tmp/tmp65vwm6xu/pip.log download --dest /private/var/folders/9w/9_4n35r57d707zkrk86rvh9w0000gn/T/process-execution76XQc1/.tmp/tmp62xkqv6d/usr.local.Cellar.python@3.9.3.9.10.Frameworks.Python.framework.Versions.3.9.bin.python3.9 PyYAML==6.0 SQLAlchemy==1.4.28 Unidecode==1.3.2 awswrangler==2.13.0 dynamic-yaml==1.3.0 fastapi==0.70.0 loguru==0.5.3 mangum==0.12.3 numpy==1.22.1 pandas==1.3.4 prophet==1.0.1 pydantic==1.8.2 pytest==6.2.5 python-jose==3.3.0 python-multipart==0.0.5 spacy==3.2.1 starlette uvicorn==0.16.0 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
None



Use `--no-process-cleanup` to preserve process chroots for inspection.
I have both -
prophet
and
pystan
installed in virtual env inside which I am working.
h

hundreds-father-404

03/16/2022, 5:09 PM
Hey Shantanu! What Pants version, and are you using a constraints file or 2.10's new lockfiles?
r

refined-addition-53644

03/16/2022, 5:10 PM
I am on 2.9 without any lockfile or constraint file
I maintain a global
3rdparty/requirements.txt
where I have added
pystan
and
prophet
both
Not sure if it's because pants/pex can't find the correct wheel from here? https://pypi.org/simple/pystan/
How can I tell pants to install
pystan
in advance before installing
prophet
? That's how it has been suggested online when trying to install
prophet
I am on 2.9 without any lockfile or constraint file
We encourage using a constraints file if on 2.9 or a lockfile if on 2.10: it makes your build more stable so things don't break overnight when a new dependency is released, and it also improves performance. But I think that should be irrelevant to solving the problem you're facing
Ah I should have linked to https://www.pantsbuild.org/docs/python-third-party-dependencies#requirements-with-undeclared-dependencies because you're on Pants 2.9, the syntax changed a little bit for how to do this
r

refined-addition-53644

03/16/2022, 5:41 PM
Tried the 2.9 one suggestion and still get the same error about not finding matching distribution
Copy code
ERROR: Could not find a version that satisfies the requirement pystan==2.19.1.1
ERROR: No matching distribution found for pystan==2.19.1.1
h

hundreds-father-404

03/16/2022, 9:07 PM
Hm, was this ever working? And how were you installing things without Pants?
r

refined-addition-53644

03/16/2022, 9:08 PM
I only started using prophet recently and installed it initially using pip. I did install pystan manually and then installed prophet.
Any idea why pants is discarding this python package tar.gz The exact tar.gz is installed by pip when I manually install using
pip install pystan==2.19.1.1
but pants keep throwing this error.
Copy code
WARNING: Discarding <https://files.pythonhosted.org/packages/10/9f/dcecf31ac08842a675ec337a14439b37d75f6da42f034b1fd5eb90b10b84/pystan-2.19.1.1.tar.gz#sha256=fa8bad8dbc0da22bbe6f36af56c9abbfcf10f92df8ce627d59a36bd8d25eb038> (from <https://pypi.org/simple/pystan/>). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
h

happy-kitchen-89482

03/17/2022, 3:59 PM
@refined-addition-53644 can you open a bug report for this at https://github.com/pantsbuild/pants/issues/new/choose with all the details, and link to it here? I don't want all these details to get lost in the ephemeral scrollback...
๐Ÿ‘ 1
r

refined-addition-53644

03/17/2022, 4:11 PM
@happy-kitchen-89482 https://github.com/pantsbuild/pants/issues/14834 Although I do see that
prophet
is trying to move away from
pystan
to
cmdstanpy
as there is an open pull request https://github.com/facebook/prophet/pull/2088
๐Ÿ™ 1
f

few-arm-93065

03/17/2022, 10:16 PM
Hi, I ran into an issue recently trying to install the pystan package. Since it is distributed as a sdist, not a wheel, pants can't build a pex. That might be causing your issue. More info here - in this thread I ask about the pyranges package, but it's the same issue - https://pantsbuild.slack.com/archives/C046T6T9U/p1643937482720159
๐Ÿ™Œ 1
๐Ÿ‘€ 1
h

happy-kitchen-89482

03/17/2022, 11:39 PM
Hmmm, related to https://github.com/pantsbuild/pants/issues/14834 ? Or is the presence of pystan in both cases a red herring?
Oh, sorry, I see that you're replying to the thread that created that issue ๐Ÿคฆ
3 Views