TorchStudio / torchstudio

IDE for PyTorch and its ecosystem
https://torchstudio.ai
MIT License
383 stars 27 forks source link

Failed installation on M2 mac #52

Closed itamblyn closed 1 year ago

itamblyn commented 1 year ago

I downloaded and attempted an install of 0.9.15 on an M2 mac. I get a conda error:

Downloading and Extracting Packages

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/exception_handler.py", line 16, in __call__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/cli/conda_argparse.py", line 126, in do_call
    return getattr(module, func_name)(args, parser)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/notices/core.py", line 123, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/cli/main_install.py", line 22, in execute
    install(args, parser, "install")
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/cli/install.py", line 387, in install
    handle_txn(unlink_link_transaction, prefix, args, newenv)
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/cli/install.py", line 414, in handle_txn
    unlink_link_transaction.download_and_extract()
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/core/link.py", line 258, in download_and_extract
    self._pfe.execute()
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/core/package_cache_data.py", line 792, in execute
    progress_bar = self._progress_bar(prec_or_spec, leave=False)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/core/package_cache_data.py", line 869, in _progress_bar
    progress_bar = ProgressBar(
                   ^^^^^^^^^^^^
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/common/io.py", line 477, in __init__
    self.pbar = self._tqdm(
                ^^^^^^^^^^^
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/conda/common/io.py", line 533, in _tqdm
    return tqdm(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/tqdm/asyncio.py", line 24, in __init__
    super(tqdm_asyncio, self).__init__(iterable, *args, **kwargs)
TypeError: init_patch() takes 1 positional argument but 2 were given

$ python_api install pytorch torchvision torchaudio torchtext -c pytorch

environment variables: CIO_TEST= CONDA_ROOT=/Users/itamblyn/TorchStudio/python CURL_CA_BUNDLE= LD_PRELOAD= PATH=/usr/bin:/bin:/usr/sbin:/sbin;/Users/itamblyn/TorchStudio/python/bin REQUESTS_CA_BUNDLE= SSL_CERT_FILE=

 active environment : None
   user config file : /Users/itamblyn/.condarc

populated config files : /Users/itamblyn/.condarc conda version : 23.5.2 conda-build version : not installed python version : 3.11.4.final.0 virtual packages : archspec=1=arm64 osx=13.4.1=0 __unix=0=0 base environment : /Users/itamblyn/TorchStudio/python (writable) conda av data dir : /Users/itamblyn/TorchStudio/python/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/pytorch/osx-arm64 https://conda.anaconda.org/pytorch/noarch https://repo.anaconda.com/pkgs/main/osx-arm64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-arm64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/itamblyn/TorchStudio/python/pkgs /Users/itamblyn/.conda/pkgs envs directories : /Users/itamblyn/TorchStudio/python/envs /Users/itamblyn/.conda/envs platform : osx-arm64 user-agent : conda/23.5.2 requests/2.29.0 CPython/3.11.4 Darwin/22.5.0 OSX/13.4.1 UID:GID : 501:20 netrc file : None offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

Upload successful. Exception ignored in: <function tqdm.del at 0x1018814e0> Traceback (most recent call last): File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/tqdm/std.py", line 1145, in del self.close() File "/Users/itamblyn/TorchStudio/python/lib/python3.11/site-packages/tqdm/std.py", line 1264, in close if self.disable: ^^^^^^^^^^^^ AttributeError: 'tqdm_asyncio' object has no attribute 'disable'

Error while installing packages

tal26 commented 1 year ago

Same on M1

drjkpalli commented 1 year ago

same on intel

divideconcept commented 1 year ago

I can repro the issue. Looks like PyTorch recently switched from conda to pip as their recommended install method: https://github.com/pytorch/pytorch.github.io/commit/763011d380f7c2acb265e7d9cbd7836436267204 The next update of TorchStudio will therefore switch to this procedure as well, which hopefully will be more stable than the conda procedure which had a few breaks and issues over the years...

divideconcept commented 1 year ago

Issue solved with 0.9.16: https://github.com/TorchStudio/torchstudio/releases/tag/0.9.16 Make sure to delete ~/TorchStudio before running 0.9.16