codequestion
codequestion copied to clipboard
pip install results No matching distribution found for torch>=1.4.0 (from txtai>=1.2.0->codequestion)
System: Windows 10 (x64) running Python 3.8.1 and pip 20.2.3.
ERROR: Could not find a version that satisfies the requirement torch>=1.4.0 (from txtai>=1.2.0->codequestion) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.4.0 (from txtai>=1.2.0->codequestion)
(env) D:\code\codequestion>python -m pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/4e/5f/528232275f6509b1fff703c9280e58951a81abe24640905de621c9f81839/pip-20.2.3-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-20.2.3
Here's what the full run looks like.
(env) D:\code\codequestion>pip install codequestion
Collecting codequestion
Using cached codequestion-1.1.0-py3-none-any.whl (17 kB)
Collecting tqdm==4.48.0
Using cached tqdm-4.48.0-py2.py3-none-any.whl (67 kB)
Collecting txtai>=1.2.0
Using cached txtai-1.2.0-py3-none-any.whl (20 kB)
Collecting mdv>=1.7.4
Using cached mdv-1.7.4.tar.gz (54 kB)
Collecting html2text>=2020.1.16
Using cached html2text-2020.1.16-py3-none-any.whl (32 kB)
Collecting numpy>=1.18.4
Downloading numpy-1.19.2-cp38-cp38-win_amd64.whl (13.0 MB)
|████████████████████████████████| 13.0 MB 6.4 MB/s
Collecting annoy>=1.16.3
Downloading annoy-1.16.3.tar.gz (644 kB)
|████████████████████████████████| 644 kB 6.4 MB/s
Collecting pymagnitude-lite>=0.1.43
Downloading pymagnitude_lite-0.1.143-py3-none-any.whl (34 kB)
Collecting nltk>=3.5
Using cached nltk-3.5.zip (1.4 MB)
Collecting sentence-transformers>=0.3.3
Using cached sentence-transformers-0.3.6.tar.gz (62 kB)
Collecting fasttext>=0.9.2
Downloading fasttext-0.9.2.tar.gz (68 kB)
|████████████████████████████████| 68 kB 4.8 MB/s
Collecting hnswlib>=0.4.0
Downloading hnswlib-0.4.0.tar.gz (17 kB)
Collecting scikit-learn>=0.23.1
Downloading scikit_learn-0.23.2-cp38-cp38-win_amd64.whl (6.8 MB)
|████████████████████████████████| 6.8 MB 3.3 MB/s
Collecting regex>=2020.5.14
Using cached regex-2020.7.14-cp38-cp38-win_amd64.whl (264 kB)
Collecting transformers==3.0.2
Downloading transformers-3.0.2-py3-none-any.whl (769 kB)
|████████████████████████████████| 769 kB 6.4 MB/s
ERROR: Could not find a version that satisfies the requirement torch>=1.4.0 (from txtai>=1.2.0->codequestion) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.4.0 (from txtai>=1.2.0->codequestion)
Thank you for reporting this. I just added a link for troubleshooting install issues to the README.
For Windows you need to do a few extra install steps. I haven't actually installed codequestion on Windows but txtai (the underlying library) does support Windows.
-
Install C++ Build Tools - https://visualstudio.microsoft.com/visual-cpp-build-tools/
-
PyTorch Windows binaries are not on PyPI, the following url link must be added when installing
pip install codequestion -f https://download.pytorch.org/whl/torch_stable.html
Then install the pre-trained model as normal:
python -m codequestion.download
The current models are built using Faiss, which don't support Windows. The index can be rebuilt with the following, will take 5-10 mins.
python -m codequestion.index
Let me know if run into more issues, happy to help.
When I run python -m codequestion.index
, this error occurs:
Python 3.6\lib\ctypes\__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found