Pip install fbprophet error

Hi, I tried to run pip install fbprophet on docker: FROM public.ecr.aws/lambda/python:3.8 RUN pip --no-cache-dir install ephem pystan fbprophet But got the following error: ERROR: Command err...

Hi,
I tried to run pip install fbprophet on docker:

FROM public.ecr.aws/lambda/python:3.8 RUN pip --no-cache-dir install ephem pystan fbprophet

But got the following error:
ERROR: Command errored out with exit status 1: command: /var/lang/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l79apfcp/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l79apfcp/fbprophet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9yrgxbdz/install-record.txt --single-version-externally-managed --compile --install-headers /var/lang/include/python3.8/fbprophet cwd: /tmp/pip-install-l79apfcp/fbprophet/ Complete output (10 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. INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /var/lang/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l79apfcp/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l79apfcp/fbprophet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9yrgxbdz/install-record.txt --single-version-externally-managed --compile --install-headers /var/lang/include/python3.8/fbprophet Check the logs for full command output. WARNING: You are using pip version 20.2.1; however, version 20.3.3 is available. You should consider upgrading via the '/var/lang/bin/python3.8 -m pip install --upgrade pip' command.

please recommend on workaround,
Thanks!

By Udisha Alok

Installing Prophet library on a Windows system can be tricky due to some dependencies with other libraries. In this blog, we will list down the steps for a smooth and hassle-free installation of Prophet on your Windows systems.

We will cover the following topics:

  • What is Prophet?
  • Prophet installation dependencies
  • Checking the environment before installing Prophet
  • Prophet installation using conda
  • Installing Prophet dependencies
  • Installing Prophet
  • Common issues and fixes

What is Prophet?

Prophet (earlier called fbprophet) is an open-source library developed by the Core Data Science team at Facebook. It is used mainly for time series forecasting.

It is robust to missing data, outliers, and trend shifts and is one of the most popular libraries used for time series forecasting. To know more about Prophet, you can go through its official documentation.

Installing Prophet on Mac OS is also possible.


Prophet installation dependencies

Prophet installation may be tricky mainly due to the following three reasons:

  1. Python version
  2. Dependency on Pystan library
  3. Microsoft C++ Build Tools dependency

Checking the environment before installing Prophet

I’m using a Windows 10 machine for this post. However, the process should work for all Windows systems.

We will first check the Python version installed on our system before we move ahead. We run the below command on the Anaconda prompt, as shown below.

Check Python version

Check Python version

If you have Python 3.6 or later, you are good to go.

However, due to the various dependencies, we suggest that you create a new environment for installing Prophet. We create an environment called  prophet39 on your system by running the below line on the Anaconda prompt:

conda create -n prophet39 python=3.9

Create a new environment for Prophet

Create a new environment for Prophet

When conda prompts us whether to proceed, we enter ‘y’.

Create a new environment for Prophet

Create a new environment for Prophet

Once it is done, we activate this prophet39 environment using the command:

conda activate prophet39

Activate the environment

Activate the environment

As you can see, we are now in the prophet39 environment. Now, we can proceed further with our installation.


Prophet installation using conda

As mentioned earlier, Prophet installation can be tricky due to its dependencies. However, a straightforward solution could be to use conda for installation. Using conda for installation has various advantages.

  1. Conda is cross-platform so it works on any system.
  2. It is easy to manage environments with conda. In the previous section, we used conda to create an environment with a specific version of Python.
  3. Conda ‘solves’ your environment for you. This means that it takes care of all the dependencies for you.

So, the first thing to do to install Prophet is to run this command on the terminal:

conda install -c conda-forge prophet

Conda installation for Prophet

Conda installation for Prophet

In most cases, this will install Prophet successfully on your system. If this works for you, you can skip the rest of the blog.

However, in some cases, you may encounter errors. Did you get one after running the above command?

If you did, this blog merits your continued attention. Read on as we take you through a step-wise description of installing the dependencies and then the Prophet library itself.


Installing Prophet dependencies

The major dependency for Prophet is Pystan. The Pystan library has its own installation instructions.

However, before we install Pystan, we need to install some other libraries.

First, we need to install the C++ compiler, mingw-w64 toolchain, which, in turn, requires libpython. So, we install both of them as follows:

conda install libpython m2w64-toolchain -c msys2

Install Pystan dependencies

Install Pystan dependencies

We need to install Cython and Numpy.

conda install cython numpy

In case of any issues, you can use the following command:

conda install numpy cython -c conda-forge

Install Cython and Numpy

Install Cython and Numpy

Now, we install some other optional dependencies, which will help in our installation proceeding smoothly.

conda install matplotlib scipy pandas -c conda-forge

Install Matplotlib, Scipy and Pandas

Install Matplotlib, Scipy and Pandas

Since Pystan is available on pip, we recommend using pip to install it, as shown below:

pip install pystan

Install Pystan

Alternatively, we can install it using conda:

conda install pystan -c conda-forge

Installing Prophet

We’re nearly at the end now.

Finally, we install Prophet using this command:

pip install prophet

Install Prophet

Install Prophet

Common issues and fixes

Prophet installation can be buggy, mainly due to its dependency on Pystan, which, in turn, has its own dependencies. However, if you follow the installation instructions listed above, the process, though long, would be smooth.

Here is a list of common issues and how to deal with them:

SNo.

Issue

Suggested Fix

1.

Using pip install for Prophet, you get an error: “running setup.py install for prophet … error

Use Anaconda to install:

conda install -c conda-forge prophet

2.

ERROR: Failed building wheel for pystan

Ensure all the dependencies for Pystan (including the optional ones) are installed.

3.

Error when installing Prophet with Python 3.9, using pip.

Try installing it on Python 3.7.

4.

Error while installing in your base environment.

We recommend creating a new environment before installing Prophet due to its various dependencies.

5.

After installation, when importing prophet, you get the error: “Importing plotly failed. Interactive plots will not work.

Check if plotly is installed in the prophet39 environment. If not, install plotly using:

pip install plotly

If plotly is already installed, upgrade it using:

pip install —upgrade plotly

6.

Error when installing pystan using pip.

Try using Anaconda to install:

conda install pystan -c conda-forge

7.

Error when installing Prophet: “error: Microsoft Visual C++ 14.0 or greater is required. Get it with «Microsoft C++ Build Tools»

Install Microsoft Visual C++ from https://visualstudio.microsoft.com/visual-cpp-build-tools/.

After that, try installing Prophet again.


Conclusion

We discussed how to install the Prophet library on a Windows machine, starting from creating an environment, installing its dependencies, and the final Prophet installation.

We also looked at some of the frequently faced issues in the installation and how to troubleshoot them. I hope this will save you some time and effort when installing this library on your Windows system.

If you consider machine learning as an important part of the future in financial markets, you can’t afford to miss this highly-recommended learning track on Machine Learning & Deep Learning in Financial Markets for those interested in ML and its applications in trading by Quantra. Enroll now!


Disclaimer: All investments and trading in the stock market involve risk. Any decisions to place trades in the financial markets, including trading in stock or options or other financial instruments is a personal decision that should only be made after thorough research, including a personal risk and financial assessment and the engagement of professional assistance to the extent you believe necessary. The trading strategies or related information mentioned in this article is for informational purposes only.

MLOT

Python provides you with a package installer called ‘pip.’ ‘Pip’ allows you to write a line of code to install packages and manage them. Although sometimes, when you are installing some packages, you might get an ‘error: legacy-install-failure.’ For example, if you are trying to install the gensim package in python. To know more about ‘pip’ check out this post.

How To Solve Error: legacy-install-failure?

Solving ‘ Error: legacy-install-failure’

Output:

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gensim

In this article, we will discuss how we can solve this error.

Pip is a package installer and manager, and the wheel is a way that pip prefers to install packages because the wheel allows fast and efficient installations and are smaller in comparison to eggs. Hence upgrading wheels might also solve the problem of ‘error: legacy-install-failure.’ The setuptools enhance the over-installation by enhancing the python standard library distribution utilities. Therefore if you update these modules, it might solve your error because this error can also arise if one of these modules is not up-to-date. Let us see how we can upgrade these modules.

  • First, update your pip installer as shown below.
python - m pip install – upgrade pip
  • Then upgrade your wheel by using:
pip install - upgrade wheel
  • Then finally upgrade the setuptools.
pip install - upgrade setuptools
  • And then again try to install the package which was throwing error in the first place.

Solve error: legacy-install-failure In Pandas

Pandas is an open-source library in python which allows users to perform high-level data manipulation. It is one of the most important libraries in python in the sense of data structure programming and data analysis because it provides flexible, fast and expressive data structures. However, sometimes when you try to install this library using pip, you can get an ‘error: legacy-install-failure,’ which can prevent us from using this very important library. Let us see how we can solve this error in python.

To solve this problem, you need to install ‘pipwin’ because it may happen that the ‘pandas’ wheel might not support the python version you are working on; therefore, first, install ‘pipwin’.

And further, when you install ‘pipwin,’ install ‘pandas’ using ‘pipwin.’

This should probably solve the ‘error: legacy-install-failure’ and allow you to install the pandas library and use it.

Solve error: legacy-install-failure For Basemap

Basemap is a tool in python that provides you to create maps in a very easy and simple way. It is an extension of the ‘matplotlib‘ library; therefore, it contains all the features for carrying out data visualization. It further adds geographical projections and some other additional data sets in order to enable plotting coastlines, countries, states, boundaries and etc., directly from the library. Similarly, when you try to install this library through ‘pip,’ you might face a Solve ‘ error: legacy-install-failure’. We will discuss how we can solve this error for the basemap library.

Solving For Windows Operating System

If you are using Windows operating system and encounter this error you need to follow some steps. The steps are as given below:

  • First, go this path https://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap
  • You will be directed to the file directory. If you’re using python 3.10.x, download the file named ‘basemap‑1.3.2‑cp310‑cp310‑win_amd64.whl
  • Now go to this wheel file and run the following command:
pip install basemap‑1.3.2‑cp310‑cp310‑win_amd64.whl

Doing this should solve the ‘error: legacy-install-failure’ error.

Solving For MAC Operating System

If you are using MAC Operating System and encounter this error, you need to follow some steps. The steps are as given below:

  • First, make sure you install all the packages as shown below:
brew install geos
brew install matplotlib
brew install numpy
brew install proj
  • Then you have to add GEOS_DIR = “/ user / local / Cellar / geos / 3.10.2 /” to your .bash profile and reload it via: source ~/.bash_profile. You can do that by :
git clone --depth 1 https://github.com/matplotlib/basemap.git
  • Further, go to the basemap directory from the path: basemap/packages/ basemap. And finally, run the install code from that directory.

This should solve the ‘error: legacy-install-failure’ error.

Solving For Google Colab

To solve this error in google colab, you need to run the commands given below, and doing that should solve the ‘error: legacy-install-failure’ error.

!sudo apt-get install libgeos-3.6.2
!sudo apt-get install libgeos-dev
!pip install git+https://github.com/matplotlib/basemap#subdirectory=packages/basemap

Solve error: legacy-install-failure For MySQL

MySQL provides services for handling and managing databases. When you connect your python application to an active server, you can manage all your database using MySQL. Although when installing using an ‘Error: legacy-install-failure’ error might occur. It can display something like this.

  note: This error originates from a subprocess, and is likely not a problem with 
pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mysqlclient

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

To solve this following error, you will need to follow the steps given below:

  • First, run the commands given below
xcode-select --install
brew install zstd
pip install pymysql
pip install wheel 
CFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib" pip install mysqlclient==<version>
  • Further, make some changes in the settings file if you are using some framework like Django or any other. To make this change run these commands.
import pymysql
pymysql.install_as_MySQLdb()

Further, install all other dependencies in the env/lib/python3.8/site-packages/django/db/backends/mysql/base.py directory. These dependencies can be installed like:

pip install mysql-connector-python
pip install cryptography
  • Now try to install MySQL again, as following these steps should solve the error.

Solve error: legacy-install-failure For Wxpython

Wxpython is a cross-platform Graphical User Interface toolkit for python language. It enables the users to program independent and robust code, which provides a very high graphical user interface very easily and quite simply. This library, like many other libraries, is open source. Although sometimes, while installing ‘wxPython,’ you might face an ‘error: legacy-install-failure’ error.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> wxPython

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

This error might occur because you might be using a python version that is not compatible with ‘wxPython.’ Therefore the easiest solution is to downgrade your python version to 3.9.13 because the last version of ‘wxPython’ came before python 3.10. There might be an alternative solution to this, but right now, this is the easiest solution.

Solve error: legacy-install-failure For Psycopg2-binary

To solve this error, you have to follow some steps. You can solve this problem by upgrading some packages.

pip uninstall psycopg2
pip list --outdated
pip install --upgrade wheel
pip install --upgrade setuptools
pip install psycopg2

This code will upgrade some outdated packages and might solve the problem.

Solve Error legacy-install-failure For Cffi

When you are programming on Django, you might get an error while installing libraries. You can solve this error by the following code.

RUN python -m venv /py && 
   /py/bin/pip install --upgrade pip && 
   apk add --update alpine-sdk && 
   apk add --update --no-cache postgresql-client && 
   apk add --update --no-cache --virtual .tmp-build-deps 
      build-base gcc python3-dev postgresql-dev musl-dev libffi-dev openssl-dev cargo  && 
   /py/bin/pip install -r /tmp/requirements.txt && 
   if [ $DEV = "true" ]; 
      then /py/bin/pip install -r /tmp/requirements.dev.txt ; 
   fi && 
   rm -rf /tmp && 
   apk del .tmp-build-deps && 
   adduser 
      --disabled-password 
      --no-create-home 
      django-user

Solve error: legacy-install-failure For Dlib

You can also get an error while installing the ‘dlib’ library through pip. To solve this error, try to install the library from scratch by following the steps.

  • First, install ‘anaconda.’
  • Further activate the virtual environment through a command prompt.
  • Install ‘opencv’ using pip.
  • Install ‘dlib’ using pip.

This will eventually solve your error.

Solve Error legacy-install-failure For Fbprophet

You can encounter an error while installing Facebook prophet using pip. This error occurs because you might not have installed dependencies for the wheel to be installed. You can solve this error by installing all the dependencies and then installing the ‘fbprophet’ using pip.

Solve error: legacy-install-failure For Horovod

When you are trying to install ‘horvord’ with ‘PyTorch,’ you might encounter an error of sort ‘error: legacy-install-failure’.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> horovod

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

This error occurs because an older version of ‘horovord’ than 0.24.0 is not compatible with PyTorch. Therefore you can solve this error by upgrading ‘horovord’ to newer versions.

[Resolved] NameError: Name _mysql is Not Defined

FAQs on Error: legacy-install-failure

How can you solve ‘error: legacy-install-failure’?

There are many ways you can solve this error, and we have discussed some of them in this article. You can follow those solutions to solve this error depending upon the library you want to install.

How to upgrade setuptools with pip?

You can upgrade setuptool with pip using the following command:
pip install - upgrade setuptools

Can you pip install pandas?

You can pip install pandas from PyPI.

Conclusion

Finally conclude, we can say that we have discussed various methods in this article to solve the ‘error: legacy-install-failure’ error which occurs for different libraries and modules. You can use any of the methods according to your requirements and according to the library or modules, you want to install for your program.

Trending Python Articles

  • “Other Commands Don’t Work After on_message” in Discord Bots

    “Other Commands Don’t Work After on_message” in Discord Bots

    February 5, 2023

  • Botocore.Exceptions.NoCredentialsError: Unable to Locate Credentials

    Botocore.Exceptions.NoCredentialsError: Unable to Locate Credentials

    by Rahul Kumar YadavFebruary 5, 2023

  • [Resolved] NameError: Name _mysql is Not Defined

    [Resolved] NameError: Name _mysql is Not Defined

    by Rahul Kumar YadavFebruary 5, 2023

  • Best Ways to Implement Regex New Line in Python

    Best Ways to Implement Regex New Line in Python

    by Rahul Kumar YadavFebruary 5, 2023

  • Remove From My Forums
  • Вопрос

  • Hello,

    I have a script that is using the Facebook Prophet model for forecasting. However, after importing my script from Jupyter to SQL Server ML Services, I am understandably receiving the following error: «ModuleNotFoundError:
    No module named ‘fbprophet'» 
    as this library has not yet been installed in the SQL Server ML Services environment.

    Upon Googling, I have navigated to the following folder to install fbprophet: «C:Program FilesMicrosoft SQL ServerMSSQL15.MSSQLSERVERPYTHON_SERVICESScripts»

    When I run «pip install fbprophet» in this directory, I get the following error:

    pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    Collecting fbprophet
      Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/fbprophet/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/fbprophet/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/fbprophet/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/fbprophet/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/fbprophet/
      Could not fetch URL https://pypi.org/simple/fbprophet/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/fbprophet/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
      Could not find a version that satisfies the requirement fbprophet (from versions: )
    No matching distribution found for fbprophet
    pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
    
    
    

    Any suggestions or ideas would be greatly appreciated! Thank you!

Hi,

I am currently stuck trying to install the ‘fbprophet’ package in Alteryx Admin Designer 2019.1.4.57073.

I run Alteryx with admin rights and tried to install the package with the following commands in the Python tool:

# List all non-standard packages to be imported by your 
# script here (only missing packages will be installed)
from ayx import Package
Package.installPackages('fbprophet')
Collecting fbprophet
  Using cached <a href="<a href="https://files.pythonhosted.org/packages/33/fb/ad98d46773929079657706e6b2b6e366ba6c282bc2397d8f9b0ea8e5614c/fbprophet-0.5.tar.gz" target="_blank">https://files.pythonhosted.org/packages/33/fb/ad98d46773929079657706e6b2b6e366ba6c282bc2397d8f9b0ea8e5614c/fbprophet-0.5.tar.gz</a>" target="_blank"><a href="https://files.pythonhosted.org/packages/33/fb/ad98d46773929079657706e6b2b6e366ba6c282bc2397d8f9b0ea8e5614c/fbprophet-0.5.tar.gz</a" target="_blank">https://files.pythonhosted.org/packages/33/fb/ad98d46773929079657706e6b2b6e366ba6c282bc2397d8f9b0ea8e5614c/fbprophet-0.5.tar.gz</a</a>>
Requirement already satisfied: Cython>=0.22 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from fbprophet)
Requirement already satisfied: pystan>=2.14 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from fbprophet)
Requirement already satisfied: numpy>=1.10.0 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from fbprophet)
Requirement already satisfied: pandas>=0.23.4 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from fbprophet)
Requirement already satisfied: matplotlib>=2.0.0 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from fbprophet)
Requirement already satisfied: lunardate>=0.1.5 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from fbprophet)
Collecting convertdate>=2.1.2 (from fbprophet)
  Using cached <a href="<a href="https://files.pythonhosted.org/packages/74/83/d0fa07078f4d4ae473a89d7d521aafc66d82641ea0af0ef04a47052e8f17/convertdate-2.1.3-py2.py3-none-any.whl" target="_blank">https://files.pythonhosted.org/packages/74/83/d0fa07078f4d4ae473a89d7d521aafc66d82641ea0af0ef04a47052e8f17/convertdate-2.1.3-py2.py3-none-any.whl</a>" target="_blank"><a href="https://files.pythonhosted.org/packages/74/83/d0fa07078f4d4ae473a89d7d521aafc66d82641ea0af0ef04a47052e8f17/convertdate-2.1.3-py2.py3-none-any.whl</a" target="_blank">https://files.pythonhosted.org/packages/74/83/d0fa07078f4d4ae473a89d7d521aafc66d82641ea0af0ef04a47052e8f17/convertdate-2.1.3-py2.py3-none-any.whl</a</a>>
Collecting holidays>=0.9.5 (from fbprophet)
  Using cached <a href="<a href="https://files.pythonhosted.org/packages/16/09/c882bee98acfa310933b654697405260ec7657c78430a14e785ef0f1314b/holidays-0.9.10.tar.gz" target="_blank">https://files.pythonhosted.org/packages/16/09/c882bee98acfa310933b654697405260ec7657c78430a14e785ef0f1314b/holidays-0.9.10.tar.gz</a>" target="_blank"><a href="https://files.pythonhosted.org/packages/16/09/c882bee98acfa310933b654697405260ec7657c78430a14e785ef0f1314b/holidays-0.9.10.tar.gz</a" target="_blank">https://files.pythonhosted.org/packages/16/09/c882bee98acfa310933b654697405260ec7657c78430a14e785ef0f1314b/holidays-0.9.10.tar.gz</a</a>>
Collecting setuptools-git>=1.2 (from fbprophet)
  Using cached <a href="<a href="https://files.pythonhosted.org/packages/05/97/dd99fa9c0d9627a7b3c103a00f1566d8193aca8d473884ed258cca82b06f/setuptools_git-1.2-py2.py3-none-any.whl" target="_blank">https://files.pythonhosted.org/packages/05/97/dd99fa9c0d9627a7b3c103a00f1566d8193aca8d473884ed258cca82b06f/setuptools_git-1.2-py2.py3-none-any.whl</a>" target="_blank"><a href="https://files.pythonhosted.org/packages/05/97/dd99fa9c0d9627a7b3c103a00f1566d8193aca8d473884ed258cca82b06f/setuptools_git-1.2-py2.py3-none-any.whl</a" target="_blank">https://files.pythonhosted.org/packages/05/97/dd99fa9c0d9627a7b3c103a00f1566d8193aca8d473884ed258cca82b06f/setuptools_git-1.2-py2.py3-none-any.whl</a</a>>
Requirement already satisfied: python-dateutil>=2.5.0 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from pandas>=0.23.4->fbprophet)
Requirement already satisfied: pytz>=2011k in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from pandas>=0.23.4->fbprophet)
Requirement already satisfied: kiwisolver>=1.0.1 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from matplotlib>=2.0.0->fbprophet)
Requirement already satisfied: cycler>=0.10 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from matplotlib>=2.0.0->fbprophet)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from matplotlib>=2.0.0->fbprophet)
Collecting ephem<3.8,>=3.7.5.3 (from convertdate>=2.1.2->fbprophet)
  Using cached <a href="<a href="https://files.pythonhosted.org/packages/c3/2c/9e1a815add6c222a0d4bf7c644e095471a934a39bc90c201f9550a8f7f14/ephem-3.7.6.0.tar.gz" target="_blank">https://files.pythonhosted.org/packages/c3/2c/9e1a815add6c222a0d4bf7c644e095471a934a39bc90c201f9550a8f7f14/ephem-3.7.6.0.tar.gz</a>" target="_blank"><a href="https://files.pythonhosted.org/packages/c3/2c/9e1a815add6c222a0d4bf7c644e095471a934a39bc90c201f9550a8f7f14/ephem-3.7.6.0.tar.gz</a" target="_blank">https://files.pythonhosted.org/packages/c3/2c/9e1a815add6c222a0d4bf7c644e095471a934a39bc90c201f9550a8f7f14/ephem-3.7.6.0.tar.gz</a</a>>
Requirement already satisfied: six in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from holidays>=0.9.5->fbprophet)
Requirement already satisfied: setuptools in c:program filesalteryxbinminiconda3pythontool_venvlibsite-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet)
Installing collected packages: ephem, convertdate, holidays, setuptools-git, fbprophet
  Running setup.py install for ephem: started
    Running setup.py install for ephem: finished with status 'error'
    Complete output from command "c:program filesalteryxbinminiconda3pythontool_venvscriptspython.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\BI\AppData\Local\Temp\pip-build-3xot9u8p\ephem\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersBIAppDataLocalTemppip-p6he8u4m-recordinstall-record.txt --single-version-externally-managed --compile --install-headers "c:program filesalteryxbinminiconda3pythontool_venvincludesitepython3.6ephem":
    running install
    running build
    running build_py
    creating build
    creating buildlib.win-amd64-3.6
    creating buildlib.win-amd64-3.6ephem
    copying ephemcities.py -> buildlib.win-amd64-3.6ephem
    copying ephemstars.py -> buildlib.win-amd64-3.6ephem
    copying ephem__init__.py -> buildlib.win-amd64-3.6ephem
    creating buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_angles.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_bodies.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_cities.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_constants.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_dates.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_github_issues.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_jpl.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_launchpad_236872.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_launchpad_244811.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_locales.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_observers.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_rst.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_satellite.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_stars.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_usno.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemteststest_usno_equinoxes.py -> buildlib.win-amd64-3.6ephemtests
    copying ephemtests__init__.py -> buildlib.win-amd64-3.6ephemtests
    creating buildlib.win-amd64-3.6ephemdoc
    copying ephemdocangle.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdoccatalogs.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocCHANGELOG.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdoccoordinates.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocdate.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocexamples.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocfaq.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocindex.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocnewton.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocquick.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocradec.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocreference.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdocrise-set.rst -> buildlib.win-amd64-3.6ephemdoc
    copying ephemdoctutorial.rst -> buildlib.win-amd64-3.6ephemdoc
    creating buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjpleuropa.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjplhyperion.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjpljupiter.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjplmars.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjplneptune.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjploberon.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjplphobos.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjplsaturn.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    copying ephemtestsjpluranus.txt -> buildlib.win-amd64-3.6ephemtestsjpl
    creating buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoappgeo_deneb.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoappgeo_jupiter.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoappgeo_moon.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoappgeo_sun.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoapptopo_deneb.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoapptopo_moon.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoapptopo_sun.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoastrom_antares.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoastrom_mercury.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoastrom_neptune.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnomoon_phases.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnorisettran_moon.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnorisettran_rigel.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoriset_moon.txt -> buildlib.win-amd64-3.6ephemtestsusno
    copying ephemtestsusnoriset_sun.txt -> buildlib.win-amd64-3.6ephemtestsusno
    running build_ext
    building 'ephem._libastro' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": <a href="<a href="http://landinghub.visualstudio.com/visual-cpp-build-tools" target="_blank">http://landinghub.visualstudio.com/visual-cpp-build-tools</a>" target="_blank"><a href="http://landinghub.visualstudio.com/visual-cpp-build-tools</a" target="_blank">http://landinghub.visualstudio.com/visual-cpp-build-tools</a</a>>
    
    ----------------------------------------
Command ""c:program filesalteryxbinminiconda3pythontool_venvscriptspython.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\BI\AppData\Local\Temp\pip-build-3xot9u8p\ephem\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersBIAppDataLocalTemppip-p6he8u4m-recordinstall-record.txt --single-version-externally-managed --compile --install-headers "c:program filesalteryxbinminiconda3pythontool_venvincludesitepython3.6ephem"" failed with error code 1 in C:UsersBIAppDataLocalTemppip-build-3xot9u8pephem
You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
<ipython-input-1-0597692990f2> in <module>
      2 # script here (only missing packages will be installed)
      3 from ayx import Package
----> 4 Package.installPackages('fbprophet')

c:program filesalteryxbinminiconda3pythontool_venvlibsite-packagesayxPackage.py in installPackages(package, install_type, debug)
    112     print(pip_install_result['msg'])
    113     if not pip_install_result['success']:
--> 114         raise pip_install_result['err']

c:program filesalteryxbinminiconda3pythontool_venvlibsite-packagesayxUtils.py in runSubprocess(args_list, debug)
     39         result = subprocess.check_output(
     40             args_list,
---> 41             stderr = subprocess.STDOUT
     42             )
     43         if debug:

C:Program FilesAlteryxbinMiniconda3libsubprocess.py in check_output(timeout, *popenargs, **kwargs)
    334 
    335     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 336                **kwargs).stdout
    337 
    338 

C:Program FilesAlteryxbinMiniconda3libsubprocess.py in run(input, timeout, check, *popenargs, **kwargs)
    416         if check and retcode:
    417             raise CalledProcessError(retcode, process.args,
--> 418                                      output=stdout, stderr=stderr)
    419     return CompletedProcess(process.args, retcode, stdout, stderr)
    420 

CalledProcessError: Command '['c:\program files\alteryx\bin\miniconda3\pythontool_venv\scripts\python.exe', '-m', 'pip', 'install', 'fbprophet']' returned non-zero exit status 1.

How can I install this package? It’s pretty urgent :(

#pip #command #facebook-prophet #prophet

Вопрос:

(Я плохо говорю по-английски, извините) У меня возникла ошибка при установке команды fbprophet для Windows. Я уже установил pystan и cython.

Я использую Windows 10, версия python 3.9.

может быть, у меня проблемы с компилятором?

Комментарий к ошибке (корейский язык по ошибке — это не очень важная вещь), —>

=== ошибка в дом с колесом === ошибка: команда ошибка с состоянием выхода 1: команда: ‘c:userskstarappdatalocalprogramspythonpython39python.exe ключ’ -U -C ‘на импорт ввода-вывода ОС, представлением sys, setuptools, разметить; файл sys.из argv[0] = ‘»‘»‘C:UserskstarAppDataLocalTemppip-install-la81h33sfbprophet_b85d314a94fb4910b19f0b36b012fb78setup.py’»‘»‘; файла=’»‘»‘C:UserskstarAppDataLocalTemppip-install-la81h33sfbprophet_b85d314a94fb4910b19f0b36b012fb78setup.py’»‘»‘;Ф = функцией getattr(маркировки, ‘»‘»‘открыть’»‘»‘, открытый)(файл) ОС.путь.существует(файл) еще Ио.StringIO(‘»‘»‘от setuptools импортировать настройки; настройки()’»‘»‘);код = F.в читать().заменить(‘»‘»‘рн’»‘»‘, ‘»‘»‘н’»‘»‘);ф.закрыть();метод exec(скомпилировать(код, файл, ‘»‘»‘метод exec’»‘»‘))’ bdist_wheel -D ‘и C:UserskstarAppDataLocalTemppip-wheel-b98qkky1’ ухо: C:UserskstarAppDataLocalTemppip-install-la81h33sfbprophet_b85d314a94fb4910b19f0b36b012fb78
полный вывод (44 строк): работает под управлением bdist_wheel сборки работает build_py создание сборки создание сборкиlib для создания построитьlib вfbprophet создание сборкиlib вfbprophetstan_model обратная трассировка (самый недавний призыв последнего): . . .

=== ошибка в управлении setup.py === ошибка: команда ошибка со статусом выхода 1 команды: c:userskstarappdatalocalprogramspythonpython39python.exe -U-с импорта ввода-вывода ОС, представлением sys, setuptools, разметить; файл sys.из argv[0] = C:UserskstarAppDataLocalTemppip-install-la81h33sfbprophet_b85d314a94fb4910b19f0b36b012fb78setup.py; файла=C:UserskstarAppDataLocalTemppip-install-la81h33sfbprophet_b85d314a94fb4910b19f0b36b012fb78setup.py;Ф = функцией getattr(маркировки, ‘»‘»‘открывать, открыть)(файл) ОС.путь.существует(файл) еще Ио.StringIO(‘»‘»‘от setuptools импортировать настройки; настройки());код = F.в читать().заменить(‘»‘»‘рн’»‘»‘, ‘»‘»‘н’»‘»‘);ф.закрыть();метод exec(скомпилировать(код, файл, ‘»‘»‘метод exec’»‘»‘))’ установить рекорд —‘C:UserskstarAppDataLocalTemppip-record-avm6oqppinstall-record.txt’ —сингл-версия-внешне управляемого —компиляции —установки-заголовками ‘c:userskstarappdatalocalprogramspythonpython39Includefbprophet’ ухо: C:UserskstarAppDataLocalTemppip-install-la81h33sfbprophet_b85d314a94fb4910b19f0b36b012fb78
Полный вывод (288 строк): запуск установки запуск сборки запуск build_py создание сборки создание сборкиlib создание сборкиlibfbprophet создание сборкиlibfbprophetstan_model ИНФОРМАЦИЯ:pystan:КОМПИЛЯЦИЯ КОДА C ДЛЯ МОДЕЛИ anon_model_f5236004a3fd5b8429270d00efcc0cf9 СЕЙЧАС. ПРЕДУПРЕЖДЕНИЕ:pystan:компилятор MSVC не поддерживается stanfit4anon_model_f5236004a3fd5b8429270d00efcc0cf9_296405994888268896.cpp c:userskstarappdatalocalprogramspythonpython39libsite-packagesnumpycoreincludenumpynpy_1_7_deprecated_api.h(14) : Предупреждение Msg: Используя устаревший API NumPy, отключите его с помощью #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

Ответ №1:

следующее уже работало для меня раньше:

 pip install localpip 
localpip install fbprophet

from fbprophet import Prophet
 

Понравилась статья? Поделить с друзьями:
  • Phyxloader dll ошибка
  • Pip install fatal error in launcher unable to create process using
  • Pinchroll error 2nd from right
  • Physxloader dll как исправить эту ошибку
  • Pip install fasttext error