-
Notifications
You must be signed in to change notification settings - Fork 248
Problems when installing FARM : ERROR: Could not find a version that satisfies the requirement torch==1.5.* #485
Description
Hi,
I was working with FARM in Google Colab do create a deep learning model for text classification. I've saved the model using the model.save and processor.save and then testet it with loading the model with the Inferencer, which worked all perfectly fine.
Now i was trying to deploy the model and integrate it to a flask script to later load it into a webapp.
I am using pycharm for this but I am having troubles loading and installing FARM. Up to now, I've tried all kinds of different versions to install Farm such as
- installing it in pycharm with a requirements.txt file
- installing it from the pycharm terminal using pip install farm, pip install farm==0.4.6, or cloning the GIT Repo, call requirements.txt and --editable .
- installing it from the package "store" in pycharm
nothing fully worked. Sometimes it seemed to have installed FARM, but when i tried to import farm (or from farm.infer import Inferencer), I kept getting a Win126 error (specific module not found) and after googling I' came across this issue with updating torch but cudaonly, so I did that but it didn't solve the problem. I also tried to delete and deinstall everything and start fresh, but I am still getting "module not found" erros or it evens kills installing and I cant even properly install FARM anymore.
So I thought that this might be because of my windows machine or some updates I did, so I tried ubuntu(version 20.04) in my VM, and when trying to install FARM from pycharm in Ubuntu system, its not working either., giving me a "non-zero exit code (137)" error.
I've also tried another laptop, started pycharm, created a requirements.txt file and wanted to install farm.
Again, i got the error.
ERROR: Could not find a version that satisfies the requirement torch==1.5.* (from farm) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
Proposed Solution:
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\Coreyn\PycharmProjects\testElea\venv\Scripts\python.exe'.
Command Output:
Collecting farm
Using cached farm-0.4.6-py3-none-any.whl (184 kB)
Requirement already satisfied: tqdm in c:\users\coreyn\pycharmprojects\testelea\venv\lib\site-packages (from farm) (4.48.2)
Collecting scipy>=1.3.2
Using cached scipy-1.5.2-cp37-cp37m-win_amd64.whl (31.2 MB)
Collecting dill
Using cached dill-0.3.2.zip (177 kB)
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Collecting sklearn
Downloading sklearn-0.0.tar.gz (1.1 kB)
Collecting flask-cors
Downloading Flask_Cors-3.0.8-py2.py3-none-any.whl (14 kB)
Collecting seqeval
Downloading seqeval-0.0.12.tar.gz (21 kB)
Collecting psutil
Using cached psutil-5.7.2-cp37-cp37m-win_amd64.whl (242 kB)
Collecting Werkzeug==0.16.1
Using cached Werkzeug-0.16.1-py2.py3-none-any.whl (327 kB)
Collecting flask-restplus
Downloading flask_restplus-0.13.0-py2.py3-none-any.whl (2.5 MB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Could not find a version that satisfies the requirement torch==1.5.* (from farm) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.5.* (from farm)
I tried what is stated in the propsed solution, but got (almost) the same error:
ERROR: Could not find a version that satisfies the requirement torch==1.5.* (from farm) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.5.* (from farm)
That was my last try and I really don't know why I can't be able to install farm properly and import Inferencer, which I need to load my model and deploy it to a webapp. I am new to programming, but I guess it must be some technical issue with the torch==1.5 version, but clueless how to solve, since all my previous approaches have been failing.
So, you guys are my last help! :D
I am using python3.7, pip 20.2.1 and Windows10, 64bit OR ubuntu20.04 on my VM
Any help appreciated!