I am unable to deploy fbprophet time series model into heroku. Locally, it works well.
The requirements.txt file contains as follows.
numpy
pandas
matplotlib
pystan==2.19.1.1
streamlit
plotly
fbprophet
Tried:
Kept default pystan without giving the version. Did not work. Error in CLI showing "Pystan loading".
Error:
Failed to build pystan fbprophet
Running setup.py install for pystan: started
No response after this.
fbprophet is older version try using prophet, if it doesn't work you can install prophet through prebuilt wheels https://pypi.org/project/prophet-prebuilt/1.0.2/#files
Related
I'm trying to install geopandas on my M1 mac and I'm running into errors
I tried to pip install all the dependencies individually but where I'm tripping up is in the install of pyproj.
I installed PROJ using brew install proj and that worked fine
When I try to pip install pyproj, I get the follow error
Building wheels for collected packages: pyproj
Building wheel for pyproj (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyproj (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
PROJ_DIR is set, using existing PROJ installation..
running bdist_wheel
running build
running build_py
running build_ext
building 'pyproj._geod' extension
pyproj/_geod.c:704:10: fatal error: 'geodesic.h' file not found
#include "geodesic.h"
^~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyproj
Failed to build pyproj
ERROR: Could not build wheels for pyproj, which is required to install pyproject.toml-based projects
Any help would be much appreciated
At the moment, installing geopandas on M1 macs can be achieved via conda or pip+homebrew.
GeoPandas itself is written in pure Python, so there is no issue running that on any architecture. However, it depends on other libraries that are written in other languages (C, C++) that need to be compiled specifically for M1 chips. While you could compile it yourself, I am not going to cover this option as it is not user friendly.
There are three possible sources of required libraries - pip wheels, conda-forge, and Homebrew.
When a Python package requires C dependency, it can create wheels with the dependency compiled for each system and chip architecture. See for example pygeos - https://pypi.org/project/pygeos/#files. What you need is *macosx_11_0_arm64.whl . If your package doesn't offer it, you have to find another way of installing than pip. Since GeoPandas requires shapely and fiona (among others) that do not have these wheels, you should look elsewhere - either on conda-forge or Homebrew. Below are both options tested as of today.
Conda and conda-forge way (recommended)
Conda-forge currently has all packages geopandas needs
Install M1 version of miniforge or mambaforge. It can be downloaded from here - https://github.com/conda-forge/miniforge.
conda install -c conda-forge geopandas pygeos
Note: if you install x86 (Intel) version of conda, it will run under Rosetta2 and install all packages using x86 architecture, meaning that everything will run under emulation. Try to avoid that.
Pip and Homebrew way
Homebrew can install C libraries compiled for M1. Python packages will find and use them.
Using an environment with Python 3.9
Install shapely:
brew install geos
export DYLD_LIBRARY_PATH=/opt/homebrew/opt/geos/lib/
pip install shapely
DYLD_LIBRARY_PATH is needed for shapely to find GEOS installation.
Install fiona:
brew install gdal
pip install fiona
Install pyproj:
brew install proj
pip install pyproj
Install geopandas and pygeos for speedups:
pip install pygeos
pip install geopandas
Note that this is a copy&paste of my own explanation given in https://github.com/geopandas/geopandas/issues/1816#issuecomment-1003093329.
Related https://github.com/pyproj4/pyproj/issues/1027
I was stuck with the same problem, I also tried setting the environment values for PROJ_DIR, PROJ_LIBDIR, PROJ_INCDIR but perhaps setting the values is causing the error, so closed the terminal and tried again and was able to install correctly
I can't tell exactly where my problem is arising, but as of about a week ago I've been unable to deploy my Node app via Shippable.
I was running an older version of Node when the issue first arose. Since then I've tried to upgrade my Node version to 10.21.0 and the same issues present. I've also tried to mess with different version of things in my shippable file to no avail
The error I get it
Downloading/unpacking setuptools>=20.0 (from awsebcli==3.7.8)
Running setup.py (path:/tmp/pip_build_root/setuptools/setup.py) egg_info for package setuptools
pkg_resources/py2_warn.py:15: UserWarning: Setuptools no longer works on Python 2
I tried several things in my shippable file, pasted in full below, commenting out the bits that did't help. I also tried to target the version for setuptools but that gave a different error
# python:
# - 2.7
node_js:
- 10.21.0
install:
- shippable_retry npm install
- npm install -g gulp
# - pip uninstall -y setuptools
# - pip install setuptools=42.0.2
# - pip install --force-reinstall awsebcli==3.14.5
# - pip install --force-reinstall botocore==1.11.9
I'm perfectly content sticking with python2 but don't know how to tell Shippable to use the older version of setuptools. Or I'm perfectly content upgrading to python3 but don't know how to tell shippable to do that.
I tried to follow the instructions on https://setuptools.readthedocs.io/en/latest/python%202%20sunset.html but they didn't seem to cooperate with shippable
Both !pip install simulation and !pip3 install simulation are failing on my Colab instance.
Both are giving me
Failed building wheel for scikit-sparse
Running setup.py clean for scikit-sparse
Failed to build scikit-sparse
...
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I tried !pip install scikit-sparse==0.4.4 and I'm getting the same.
Does this unblock you?
!apt-get install libsuitesparse-dev && pip install scikit-sparse==0.4.4
When I try to deploy to Heroku, the following error occurs:
remote: File "/tmp/build_283a27430a6f3f4cbf76d08e0f6a61d6/.heroku/python/lib/python3.6/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
remote: orig_path.sort(key=position_in_sys_path)
remote: AttributeError: '_NamespacePath' object has no attribute 'sort'
This issue seems to be related to Pip. From what I understand, it can be solved by running:
pip install --upgrade setuptools
But I can't specify the version of setuptools on Heroku. From the official documentation:
The following libraries are used by the platform for managing and
running Python applications and cannot be specified.
Setuptools 23.1.0: Python packaging tools.
Pip 9.0.1: Application dependency resolution.
If your application declares these dependencies in a requirements.txt or Pipfile, unexpected behavior may occur.
How can I fix this issue?
Looks like this issue has been solved yesterday.
Removing the heroku application and creating a new one (so that it updates Pipenv) should do the trick!
I am installing psychopy package using pip install and I am facing the following error:
ImportError: No module named 'preferences'
Command "python setup.py egg_info" failed with error code 1
I've already installed preferences package and this error keep on showing up.
I stumbled upon the same problem, and it seems like installing 'django-preferences' helped me
sudo pip install django-preferences
Hope this helps.