Проблемы с установкой fbprophet
При вызове команды "pip install fbprophet" выдаются следующие ошибки:
C:\Users\Usr>pip install fbprophet
Collecting fbprophet
Using cached fbprophet-0.6.tar.gz (54 kB)
Requirement already satisfied: Cython>=0.22 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (0.29.15)
Requirement already satisfied: cmdstanpy==0.4 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (0.4.0)
Requirement already satisfied: pystan>=2.14 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (2.19.1.1)
Requirement already satisfied: numpy>=1.10.0 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (1.18.1)
Requirement already satisfied: pandas>=0.23.4 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (1.0.2)
Requirement already satisfied: matplotlib>=2.0.0 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (3.2.0)
Requirement already satisfied: LunarCalendar>=0.0.9 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (0.0.9)
Requirement already satisfied: convertdate>=2.1.2 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (2.2.0)
Requirement already satisfied: holidays>=0.9.5 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (0.10.1)
Requirement already satisfied: setuptools-git>=1.2 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from fbprophet) (2.8.1)
Requirement already satisfied: pytz>=2017.2 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from pandas>=0.23.4->fbprophet) (2019.3)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (1.1.0)
Requirement already satisfied: cycler>=0.10 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (2.4.6)
Requirement already satisfied: ephem>=3.7.5.3 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from LunarCalendar>=0.0.9->fbprophet) (3.7.7.1)
Requirement already satisfied: pymeeus<=1,>=0.3.6 in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from convertdate>=2.1.2->fbprophet) (0.3.7)
Requirement already satisfied: six in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from holidays>=0.9.5->fbprophet) (1.14.0)
Requirement already satisfied: setuptools in c:\users\usr\appdata\local\programs\python\python37\lib\site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (41.2.0)
Installing collected packages: fbprophet
Running setup.py install for fbprophet ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\usr\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Usr\\AppData\\Local\\Temp\\pip-install-nttrj5fb\\fbprophet\\setup.py'"'"'; __file__='"'"'C:\\Users\\Usr\\AppData\\Local\\Temp\\pip-install-nttrj5fb\\fbprophet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Usr\AppData\Local\Temp\pip-record-q2i_9k2a\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\usr\appdata\local\programs\python\python37\Include\fbprophet'
cwd: C:\Users\Usr\AppData\Local\Temp\pip-install-nttrj5fb\fbprophet\
Complete output (45 lines):
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\fbprophet
creating build\lib\fbprophet\stan_model
Importing plotly failed. Interactive plots will not work.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Usr\AppData\Local\Temp\pip-install-nttrj5fb\fbprophet\setup.py", line 148, in <module>
"""
File "c:\users\usr\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\usr\appdata\local\programs\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\usr\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Usr\AppData\Local\Temp\pip-install-nttrj5fb\fbprophet\setup.py", line 48, in run
build_models(target_dir)
File "C:\Users\Usr\AppData\Local\Temp\pip-install-nttrj5fb\fbprophet\setup.py", line 38, in build_models
StanBackendEnum.get_backend_class(backend).build_model(target_dir, MODEL_DIR)
File "C:\Users\Usr\AppData\Local\Temp\pip-install-nttrj5fb\fbprophet\fbprophet\models.py", line 206, in build_model
import pystan
File "c:\users\usr\appdata\local\programs\python\python37\lib\site-packages\pystan\__init__.py", line 9, in <module>
from pystan.api import stanc, stan
File "c:\users\usr\appdata\local\programs\python\python37\lib\site-packages\pystan\api.py", line 13, in <module>
import pystan._api # stanc wrapper
ImportError: DLL load failed: Не найден указанный модуль.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\usr\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Usr\\AppData\\Local\\Temp\\pip-install-nttrj5fb\\fbprophet\\setup.py'"'"'; __file__='"'"'C:\\Users\\Usr\\AppData\\Local\\Temp\\pip-install-nttrj5fb\\fbprophet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Usr\AppData\Local\Temp\pip-record-q2i_9k2a\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\usr\appdata\local\programs\python\python37\Include\fbprophet' Check the logs for full command output.
pystan уже установлен, не могу понять, в чем проблема.
Ответы (2 шт):
Автор решения: MaxU
→ Ссылка
На официальном сайте fbprohet существует заметка по установке PyStan на Windows:
On Windows, PyStan requires a compiler so you’ll need to follow the instructions. The easiest way to install Prophet in Windows is in Anaconda.
PS связанный ответ показывающий как создать conda environment для задач по машинному обучению
Автор решения: mr.polden2010
→ Ссылка
Для установки fbProphet в W10 64x, без conda, Python3.7.4, мне помогли такие шаги:
CMD запущен с правами администратора.
- pip3 install Cython
- Download Visual C++ Build Tools installer and install it from here(выбрал все пункты при установке = 9Gb): http://go.microsoft.com/fwlink/?LinkId=691126&fixForIE=.exe
- Go to this link and download the setup and install Visual C++ Redistributable for Visual Studio 2015: https://www.microsoft.com/en-in/download/details.aspx?id=48145
- перезагрузка
- pip3 install pystan==2.17.1.0
- pip3 install fbprophet
Ссылки: