Skip to content

Commit 79f982b

Browse files
removed scipy from build-only dependencies (#3538)
* removed scipy from build-only dependencies; updated README accordingly * fixed conditions regarding oldest numpy installation on arm64 Windows machines * README rephrased regarding NumPy installation * Revert "fixed conditions regarding oldest numpy installation on arm64 Windows machines" This reverts commit 68197fb. * pin scipy, need old sparsetools for wheel testing * make scipy pin more strict * use macos-latest instead of deprecated macos-11 * pin scipy in setup.py * remove redundant scipy pin from build-wheels.yml * get rid of remaining macos-11 traces in CI workflow * use macos-12 instead of macos-latest --------- Co-authored-by: Michael Penkov <[email protected]>
1 parent afbb82e commit 79f982b

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

.github/workflows/build-wheels.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
os: [ubuntu-20.04, windows-2019, macos-11]
26+
os: [ubuntu-20.04, windows-2019, macos-12]
2727
steps:
2828

2929
- name: Checkout
@@ -61,11 +61,11 @@ jobs:
6161
fail-fast: false
6262
matrix:
6363
include:
64-
- {python: '3.8', os: macos-11}
65-
- {python: '3.9', os: macos-11}
66-
- {python: '3.10', os: macos-11}
67-
- {python: '3.11', os: macos-11}
68-
- {python: '3.12', os: macos-11}
64+
- {python: '3.8', os: macos-12}
65+
- {python: '3.9', os: macos-12}
66+
- {python: '3.10', os: macos-12}
67+
- {python: '3.11', os: macos-12}
68+
- {python: '3.12', os: macos-12}
6969

7070
- {python: '3.8', os: ubuntu-20.04}
7171
- {python: '3.9', os: ubuntu-20.04}

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ on Wikipedia.
4949
Installation
5050
------------
5151

52-
This software depends on [NumPy and Scipy], two Python packages for
53-
scientific computing. You must have them installed prior to installing
54-
gensim.
55-
56-
It is also recommended you install a fast BLAS library before installing
57-
NumPy. This is optional, but using an optimized BLAS such as MKL, [ATLAS] or
58-
[OpenBLAS] is known to improve performance by as much as an order of
52+
This software depends on [NumPy], a Python package for
53+
scientific computing. Please bear in mind that building NumPy from source
54+
(e.g. by installing gensim on a platform which lacks NumPy .whl distribution)
55+
is a non-trivial task involving [linking NumPy to a BLAS library].
56+
It is recommended to provide a fast one (such as MKL, [ATLAS] or
57+
[OpenBLAS]) which can improve performance by as much as an order of
5958
magnitude. On OSX, NumPy picks up its vecLib BLAS automatically,
6059
so you don’t need to do anything special.
6160

@@ -69,7 +68,9 @@ Or, if you have instead downloaded and unzipped the [source tar.gz]
6968
package:
7069

7170
```bash
72-
python setup.py install
71+
tar -xvzf gensim-X.X.X.tar.gz
72+
cd gensim-X.X.X/
73+
pip install .
7374
```
7475

7576
For alternative modes of installation, see the [documentation].
@@ -172,7 +173,8 @@ BibTeX entry:
172173
[documentation and Jupyter Notebook tutorials]: https://github.com/RaRe-Technologies/gensim/#documentation
173174
[Vector Space Model]: https://en.wikipedia.org/wiki/Vector_space_model
174175
[unsupervised document analysis]: https://en.wikipedia.org/wiki/Latent_semantic_indexing
175-
[NumPy and Scipy]: https://scipy.org/install/
176+
[NumPy]: https://numpy.org/install/
177+
[linking NumPy to a BLAS library]: https://numpy.org/devdocs/building/blas_lapack.html
176178
[ATLAS]: https://math-atlas.sourceforge.net/
177179
[OpenBLAS]: https://xianyi.github.io/OpenBLAS/
178180
[source tar.gz]: https://pypi.org/project/gensim/

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ requires = [
99
# is 1.18.5, remove the line when they increase oldest supported Numpy for this platform
1010
"numpy==1.18.5; python_version=='3.8' and platform_machine not in 'arm64|aarch64'",
1111
"oldest-supported-numpy; python_version>'3.8' or platform_machine in 'arm64|aarch64'",
12-
#
13-
# SciPy 1.14.0 onwards removed the deprecated sparsetools submodule needed by gensim.models.lsimodel
14-
#
15-
"scipy<=1.13.1",
1612
"setuptools",
1713
"wheel",
1814
]

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,10 @@ def run(self):
331331

332332
install_requires = [
333333
NUMPY_STR,
334-
'scipy >= 1.7.0',
334+
#
335+
# scipy 1.14.0 and onwards removes deprecated sparsetools submodule
336+
#
337+
'scipy >= 1.7.0, <1.14.0',
335338
'smart_open >= 1.8.1',
336339
]
337340

0 commit comments

Comments
 (0)