Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues getting environment properly installed on M1 Mac #4

Open
davidcolton opened this issue Jan 16, 2023 · 8 comments
Open

Issues getting environment properly installed on M1 Mac #4

davidcolton opened this issue Jan 16, 2023 · 8 comments

Comments

@davidcolton
Copy link

Any help you'd be able to offer to get the development environment setup and working on an M1 Mac would be greatly appreciated.

The log of the conda command is attached.

Thanks.

conda_error.log

@manujosephv
Copy link
Collaborator

These dependency errors are notoriously hard to figure out. One way to try and resolve is to unpin versions in the conda file one by one.

for instance:
Try changing statsforecast==0.6.0 to statsforecast>=0.6.0
and python-kaleido==0.1.0 to python-kaleido>=0.1.0

And if that's also not working,
- u8darts<=0.19.0 to - u8darts==0.19.0 or - u8darts>=0.19.0

While this can resolve the conda dependency issues, there is a small risk that some code may not work.

@koen-dejonghe
Copy link

I have followed the instructions for statsforecast and python-kaleido. Seems to work, but then:

Executing transaction: done
Installing pip dependencies: | Ran pip subprocess with arguments:
['/opt/homebrew/anaconda3/envs/modern_ts/bin/python', '-m', 'pip', 'install', '-U', '-r', '/Users/.../Modern-Time-Series-Forecasting-with-Python/condaenv.3kbl5r_a.requirements.txt', '--exists-action=b']
Pip subprocess output:
Collecting git+https://github.com/manujosephv/pytorch_tabular.git@76e83fb (from -r /Users/.../Modern-Time-Series-Forecasting-with-Python/condaenv.3kbl5r_a.requirements.txt (line 8))
  Cloning https://github.com/manujosephv/pytorch_tabular.git (to revision 76e83fb) to /private/var/folders/wy/v6f0ncw16k58dwlsf1jjph7c0000gq/T/pip-req-build-_6pcpbj7
  Resolved https://github.com/manujosephv/pytorch_tabular.git to commit 76e83fb
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

Pip subprocess error:
  Running command git clone --filter=blob:none --quiet https://github.com/manujosephv/pytorch_tabular.git /private/var/folders/wy/v6f0ncw16k58dwlsf1jjph7c0000gq/T/pip-req-build-_6pcpbj7
  WARNING: Did not find branch or tag '76e83fb', assuming revision or ref.
  Running command git checkout -q 76e83fb
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      error in pytorch_tabular setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
          protobuf<=3.20.*
                  ~~~~~~^
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed

@koen-dejonghe
Copy link

koen-dejonghe commented Feb 4, 2023

fancyimpute also does not install:

      subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for osqp
Failed to build osqp
ERROR: Could not build wheels for osqp, which is required to install pyproject.toml-based projects

I dug further into this, by trying to install al sorts of packages with brew (cmake, llvm, suite-sparse), but to no avail.

@Richdadua
Copy link

...

WARNING: Did not find branch or tag '76e83fb', assuming revision or ref.
Running command git checkout -q 76e83fb
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
error in pytorch_tabular setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
protobuf<=3.20.*
~~~~~~^
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed

I got exactly the same error

@manujosephv
Copy link
Collaborator

manujosephv commented Feb 5, 2023

@koen-dejonghe I think you can safely skip fancyimpute. It is a problematic package. The other error, let me dig into and figure out.

@manujosephv
Copy link
Collaborator

manujosephv commented Feb 5, 2023

As of 22.0, pip has made some changes which might be causing this issue. I've seen this for other libraries as well.
Issue on packaging

So, this is the solution:

I have removed timesynth and fancyimpute from the anaconda env. That along with the changes to statsforecast and python-kaleido make it working in my M1 Pro. (I haven't checked in statsforecast and python-kaleido changes because it seems to be Mac specific. I'll probably add it to the Readme as well. The downside is that there is one notebook in chapter 1 which uses timesynth. You can try installing that separately and see if that works. Good news is that the rest of the environment works fine now.

Let me know if this works for you so that I can pin the issue and add it to readme.

@koen-dejonghe
Copy link

With the new anaconda_env.yml , the conda environment installs without issues on my machine.
Thank you very much.

@manujosephv manujosephv pinned this issue Feb 5, 2023
@fip17
Copy link

fip17 commented Apr 6, 2023

Mac M2/M1 problem on runnin test_installation.py:
AssertionError: Torch not compiled with CUDA enabled

I did the version yml corrections for
statsforecast>=0.6.0 and
python-kaleido>=0.1.0 and
u8darts>=0.19.0
mamba env create -f anaconda_env.yml

no fancyimpute, no timesynth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants