Skip to content

Commit 327221c

Browse files
committed
Uninstall typing
1 parent 9779891 commit 327221c

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

tools/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ else
148148
python3 -m pip install $(PIP_CHAINER) cupy==$(CHAINER_VERSION); \
149149
fi
150150
endif
151+
# chainer=6.0.0 depends on typing<=3.6.6, but this causes the following error when installing some modules. e.g. fairseq
152+
# AttributeError: type object 'Callable' has no attribute '_abc_registry'
153+
# "typing" modules is not required for python>=3.6, so uninstall here
154+
python3 -m pip uninstall -y typing
151155
touch chainer.done
152156

153157
# NOTE(kamo): Add conda_packages.done if cmake is used

tools/installers/install_fairseq.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,10 @@ echo "cuda_version=${cuda_version}"
4646
if "${torch_15_plus}" && "${python_36_plus}"; then
4747

4848
rm -rf fairseq
49-
49+
5050
# FairSeq Commit id when making this PR: `commit 6225dccb989ebfb268274bad36a794b27e4dd43f`
5151
git clone https://github.com/pytorch/fairseq.git
52-
(
53-
set -euo pipefail
54-
55-
cd fairseq
56-
57-
pip uninstall typing
58-
pip install --editable ./
59-
pip install typing
60-
)
52+
python3 -m pip install --editable ./fairseq
6153

6254
else
6355
echo "[WARNING] fairseq is not prepared for pytorch<1.5.0, python<3.6 now"

0 commit comments

Comments
 (0)