Repository: Unbabel/COMET
Issue: 'pip install unbabel-comet' error
Root cause: Environment Incompatibility

#### What is your question?
Trying to install module using pip but unable to do so due to errors.

#### Code
pip install unbabel-comet  
[CometPipIssue.txt](https://github.com/Unbabel/COMET/files/8541347/CometPipIssue.txt)

#### What have you tried?
tried to install module using tar file, its also unsuccessful.
refer attached notefiles for output.
[CometOfflinePackageIssue.txt](https://github.com/Unbabel/COMET/files/8541346/CometOfflinePackageIssue.txt)

#### What's your environment?

 - OS: Windows 10


Hi @Vinayak-Basude! It seems like you are having problems installing numpy. The numpy version that comet requires is >=1.20.0. I would try to install numpy before unbabel-comet.

In any case I searched a bit for your error and I think you have something wrong in your pip/python setup. This error: _ERROR: No matching distribution found for torch<=1.10.0,>=1.6.0_ is not expected at all. Can you install other packages other than COMET?

This does not seem a COMET installation problem but rather something wrong in your python setup... have you tried just `pip install numpy` or `pip install torch`? 

> 

@ricardorei , Thanks for your suggestions. I was able to install it on conda environment.
But when I tried to run the test script from github page 'scoring with python', it throwed below error.

```
C:\ProgramData\Anaconda3\lib\site-packages\setuptools\distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
  warnings.warn(
Traceback (most recent call last):

  File "<ipython-input-1-3c986627dd00>", line 3, in <module>
    model_path = download_model("wmt20-comet-da")

  File "C:\ProgramData\Anaconda3\lib\site-packages\comet\download_utils.py", line 189, in download_model
    saving_directory = get_cache_folder()

  File "C:\ProgramData\Anaconda3\lib\site-packages\comet\download_utils.py", line 38, in get_cache_folder
    raise Exception("HOME environment variable is not defined.")

Exception: HOME environment variable is not defined.
```

Please suggest If my module installation has any error!

Hmmm this might have to be with the fact that you are using windows which use a different HOME directory.

Try it this way:

First download the model you want to use, for example with wget:
```
wget https://unbabel-experimental-models.s3.amazonaws.com/comet/wmt20/wmt20-comet-da.tar.gz
tar -xf wmt20-comet-da.tar.gz
```

Then pass the path to the model checkpoint:

```
comet-score -s src.de -t hyp1.en -r ref.en --model PATH/TO/FOLDER/wmt20-comet-da/checkpoints/model.ckpt
```



sorry, but support for windows is not great atm, especially with the way models are stored locally. I'll try to make it better on the next release! 

@ricardorei, Thank you for considering!

> sorry, but support for windows is not great atm, especially with the way models are stored locally. I'll try to make it better on the next release!

@ricardorei, I changed code to check if 'HOMEPATH' is available in os.environ value which solved the issue with score calculation.
filename: C:\ProgramData\Anaconda3\Lib\site-packages\comet\download_utils.py
line - 32, 33

```
    if "HOMEPATH" in os.environ:
        cache_directory = os.environ["HOMEPATH"] + "/.cache/torch/unbabel_comet/"
```