thompsonb / prism

MT Evaluation in Many Languages via Zero-Shot Paraphrasing
Other
102 stars 23 forks source link

Windows Support #10

Open stribizhev opened 3 years ago

stribizhev commented 3 years ago

Any ideas how to make it work in Windows? I am trying to make it work in a virtual environment using pipenv, and all the time when I try to run pipenv --verbose install -r requirements.txt I get

PS C:\MyFilesPython\WAW_Scorecard_Scores_64\prism> pipenv --verbose install -r requirements.txt
Requirements file provided! Importing into Pipfile...
Pipfile.lock (9bcd56) out of date, updating to (d0046a)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
 Locking...Building requirements...
Resolving dependencies...
[   =] Locking...
Locking Failed!
                          ROUND 1
Current constraints:
  fairseq==0.9.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 4))
  openpyxl (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 2))
  sacrebleu>=1.4.8 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 6))
  sentencepiece==0.1.86 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 3))
  spacy-universal-sentence-encoder (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 9))
  tensorflow-text (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 8))
  torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7))
  torchvision==0.5.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 5))

Finding the best candidates:
  found candidate fairseq==0.9.0 (constraint was ==0.9.0)
  found candidate openpyxl==3.0.9 (constraint was <any>)
  found candidate sacrebleu==2.0.0 (constraint was >=1.4.8)
  found candidate sentencepiece==0.1.86 (constraint was ==0.1.86)
  found candidate spacy-universal-sentence-encoder==0.4.3 (constraint was <any>)
  found candidate tensorflow-text==2.6.0 (constraint was <any>)
  found candidate torch==1.4.0 (constraint was ==1.4.0)
  found candidate torchvision==0.5.0 (constraint was ==0.5.0)

Finding secondary dependencies:
  fairseq==0.9.0            requires cffi, cython, numpy, regex, sacrebleu, torch, tqdm
  openpyxl==3.0.9           requires et-xmlfile
  tensorflow-text==2.6.0    requires tensorflow-hub>=0.8.0, tensorflow<2.7,>=2.6.0
  torchvision==0.5.0 not in cache, need to check index
  torchvision==0.5.0        requires numpy, pillow>=4.1.1, six, torch==1.4.0
  sacrebleu==2.0.0 not in cache, need to check index
  sacrebleu==2.0.0          requires colorama, numpy>=1.17, portalocker, regex, tabulate>=0.8.9
  torch==1.4.0 not in cache, need to check index
CRITICAL:pipenv.patched.notpip._internal.index.package_finder:Could not find a version that satisfies the requirement torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1)
Traceback (most recent call last):
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 825, in resolve
    results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\resolver.py", line 180, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\resolver.py", line 268, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\resolver.py", line 383, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 229, in get_dependencies
    legacy_results = self.get_legacy_dependencies(ireq)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 351, in get_legacy_dependencies
    download_dir, ireq, wheel_cache
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 306, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\legacy_resolve.py", line 339, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\legacy_resolve.py", line 286, in _get_abstract_dist_for     
    req.populate_link(self.finder, upgrade_allowed, require_hashes)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\req\req_install.py", line 249, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\index\package_finder.py", line 963, in find_requirement     
    'No matching distribution found for %s' % req
pipenv.patched.notpip._internal.exceptions.DistributionNotFound: No matching distribution found for torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 764, in <module>
    main()
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 760, in main
    dev=parsed.dev)
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 741, in _main
    resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 709, in resolve_packages
    requirements_dir=requirements_dir,
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 692, in resolve
    req_dir=requirements_dir
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 1405, in resolve_deps
    req_dir=req_dir,
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 1110, in actually_resolve_deps
    resolver.resolve()
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 835, in resolve
    raise ResolutionFailure(message=str(e))
pipenv.exceptions.ResolutionFailure: ERROR: No matching distribution found for torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7))
ROUND 1
Current constraints:
  fairseq==0.9.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 4))
  openpyxl (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 2))
  sacrebleu>=1.4.8 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 6))
  sentencepiece==0.1.86 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 3))
  spacy-universal-sentence-encoder (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 9))
  tensorflow-text (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 8))
  torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7))
  torchvision==0.5.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 5))

Finding the best candidates:
  found candidate fairseq==0.9.0 (constraint was ==0.9.0)
  found candidate openpyxl==3.0.9 (constraint was <any>)
  found candidate sacrebleu==2.0.0 (constraint was >=1.4.8)
  found candidate sentencepiece==0.1.86 (constraint was ==0.1.86)
  found candidate spacy-universal-sentence-encoder==0.4.3 (constraint was <any>)
  found candidate tensorflow-text==2.6.0 (constraint was <any>)
  found candidate torch==1.4.0 (constraint was ==1.4.0)
  found candidate torchvision==0.5.0 (constraint was ==0.5.0)

Finding secondary dependencies:
  fairseq==0.9.0            requires cffi, cython, numpy, regex, sacrebleu, torch, tqdm
  openpyxl==3.0.9           requires et-xmlfile
  tensorflow-text==2.6.0    requires tensorflow-hub>=0.8.0, tensorflow<2.7,>=2.6.0
  torchvision==0.5.0 not in cache, need to check index
  torchvision==0.5.0        requires numpy, pillow>=4.1.1, six, torch==1.4.0
  sacrebleu==2.0.0 not in cache, need to check index
  sacrebleu==2.0.0          requires colorama, numpy>=1.17, portalocker, regex, tabulate>=0.8.9
  torch==1.4.0 not in cache, need to check index
CRITICAL:pipenv.patched.notpip._internal.index.package_finder:Could not find a version that satisfies the requirement torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1)
Traceback (most recent call last):
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 825, in resolve
    results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\resolver.py", line 180, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\resolver.py", line 268, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\resolver.py", line 383, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 229, in get_dependencies
    legacy_results = self.get_legacy_dependencies(ireq)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 351, in get_legacy_dependencies
    download_dir, ireq, wheel_cache
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 306, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\legacy_resolve.py", line 339, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\legacy_resolve.py", line 286, in _get_abstract_dist_for     
    req.populate_link(self.finder, upgrade_allowed, require_hashes)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\req\req_install.py", line 249, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\patched\notpip\_internal\index\package_finder.py", line 963, in find_requirement     
    'No matching distribution found for %s' % req
pipenv.patched.notpip._internal.exceptions.DistributionNotFound: No matching distribution found for torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 764, in <module>
    main()
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 760, in main
    dev=parsed.dev)
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 741, in _main
    resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 709, in resolve_packages
    requirements_dir=requirements_dir,
  File "c:/users/wstribizew/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 692, in resolve
    req_dir=requirements_dir
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 1405, in resolve_deps
    req_dir=req_dir,
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 1110, in actually_resolve_deps
    resolver.resolve()
  File "c:\users\wstribizew\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 835, in resolve
    raise ResolutionFailure(message=str(e))
pipenv.exceptions.ResolutionFailure: ERROR: No matching distribution found for torch==1.4.0 (from -r C:\Users\WSTRIB~1\AppData\Local\Temp\pipenvsucc0yy3requirements\pipenv-yx1ea0_t-constraints.txt (line 7))
thompsonb commented 3 years ago

I have not tried to run Prism on Windows, but I would suggest trying Anaconda. PyTorch appears to be available on Windows (see https://docs.microsoft.com/en-us/windows/ai/windows-ml/tutorials/pytorch-installation) but I'm not sure about the other dependencies.

If you are able to get it working please let us know how you did it for future reference.

thompsonb commented 3 years ago

Also see #7