unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
8.02k stars 871 forks source link

Windows installation #438

Closed adschem closed 3 years ago

adschem commented 3 years ago

Hello, when installing darts libary using conda as per instructions with python 3.7 i get the following error:


PS C:\Users\XXXX> conda install -c conda-forge u8darts-all
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Do you have any ideas why this is happening?

I can install prophet on it's own but not the darts libary.

Thanks,

Adam

tomasvanpottelbergh commented 3 years ago

Hi Adam,

Thank you for reporting this. The issue is probably that the pmdarima package is not supported on Windows when using the conda installation method. Could you try if the installation using pip works for you?

adschem commented 3 years ago

pip fails due to fbprophet not building due to pystan.

I found a solution to this earlier, using:

conda create --name XXX python = 3.7 conda activate XXX conda install -c conda-forge -c pytorch pip fbprophet pytorch cpuonly pip install plotly, darts

This works but I was concerned about the conflict between conda and pip here. I also couldn't come up with a way to install pytorch to the GPU so that this could be used, if you have any ideas that would be great :)

Thanks Adam

tomasvanpottelbergh commented 3 years ago

Thanks for testing and finding a solution. The mix of conda and pip is not ideal, but as long as you install the right versions, this should be fine as a workaround.

I have no personal experience with installing it on Windows, but following the official installation instructions with CUDA on the PyTorch website should work to use the GPU.

adschem commented 3 years ago

I can get PyTorch to install with GPU and see it, however once i try to install darts pytorch is no longer installed with CUDA, not sure why

tomasvanpottelbergh commented 3 years ago

I imagine that might be because you are reinstalling PyTorch using pip. Could you try recreating the conda environment and reinstalling the prerequisites using conda, but using pip install u8darts instead of pip install darts?

adschem commented 3 years ago

ah yes, if i do that will things like prophet, n-beats still work within darts?

tomasvanpottelbergh commented 3 years ago

As long as you install Prophet and PyTorch separately that should work, but check the files in the requirements folder in the repo to get the right versions.

GitHunter0 commented 3 years ago

Hi folks, I'm also having trouble installing on Windows 10 via conda, which is unfortunate...

These commands

conda create -n st_gt python=3.8 pip
conda install --channel=conda-forge u8darts-all

throw this error:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort./
Building graph of deps:   0%|                                                                                               | 0/4 [00:00<?, ?it/s]\
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

I will try to use the pip workaround suggested here.

Thank you

tomasvanpottelbergh commented 3 years ago

pmdarima is now available for Windows on conda-forge. Could you try installing u8darts-all again using conda in a fresh environment (without any pip installs)?

GitHunter0 commented 3 years ago

Hey @tomasvanpottelbergh , I tried but conda install --channel=conda-forge u8darts-all throws this output:

(darts) C:\Users\flavio>conda install --channel=conda-forge u8darts-all
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError:
tomasvanpottelbergh commented 3 years ago

Thanks for testing! Unfortunately the error is not very helpful... Are there any packages listed under the UnsatisfiableError?

Can you also tell me which Python version you installed in that conda environment? You could try again with 3.7 or 3.8 if this was using 3.9.

GitHunter0 commented 3 years ago

You're welcome! Nothing appeared under UnsatisfiableError but I'm not sure what python version was installed since I forgot to specify it. Now I created another new conda env with python 3.8.10 and received this output:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.|
Examining @/win-64::__win==0=0:  50%|████████████████████████████████████████                                        | 2/4 [00:00<00:00, 20.00it/s]-                                                                                                                                                   \
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

PS: the same message appeared when I tested on python 3.7.10

tomasvanpottelbergh commented 3 years ago

It seems the problem is that PyTorch is not available on conda-forge for Windows. Could you try again using conda install -c conda-forge -c pytorch u8darts-all?

GitHunter0 commented 3 years ago

Hey @tomasvanpottelbergh , it worked!

Just the space it took was huge, 5GB. I know pytorch is large, but is this the expected size of darts installation?

tomasvanpottelbergh commented 3 years ago

@GitHunter0 glad that worked!

Regarding the size: darts itself is very small, but some of the dependencies of u8darts-all might not be. PyTorch on Windows should take about 1.6 GB, so I'm not sure where the rest comes from. Maybe CUDA and other dependencies? You could also try to install u8darts-torch if you're not using Prophet and pmdarima.

GitHunter0 commented 3 years ago

Thank you @tomasvanpottelbergh , that was what I thought. Maybe darts could also give a choice to install everything except CUDA (installing just cpuonly)