Running setup.py install for fbprophet ... error - python

I cannot install fbprophet or gcc7.
I have manually installed a precompiled ephem.
Running setup.py install for fbprophet ... error
I have tried with python 3.6 and 3.7. I have tried running as administrator and without.
My anaconda prompt cannot install anything without throwing errors. I would rather use pip.
The problem may be related to pystan.
File "d:\python37\lib\site-packages\pystan\api.py", line 13, in <module> import pystan._api # stanc wrapper
ImportError: DLL load failed: The specified module could not be found.
I am using windows 10.

Use:
The first step is to remove pystan and cache:
pip uninstall fbprophet pystan
pip --no-cache-dir install pystan==2.17 #any version
pip --no-cache-dir install fbprophet==0.2 #any version
conda install Cython --force
pip install pystan
conda install pystan -c conda-forge
conda install -c conda-forge fbprophet
It creates a wheel and update the environment necessary for the package. pip install fbprophet creates the similar issue.
Be sure that pystan is working.
import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)
y = model.sampling().extract()['y']
y.mean() # with luck the result will be near 0
Use this link: Installing PyStan on windows

Reason: The python distribution on Anaconda3 uses an old version of gcc (4.2.x)
Please use anaconda prompt as administrator
set a new environment for a stan
conda create -n stan python=<your_version> numpy cython
install pystan and gcc inside the virtual environment.
conda activate stan
or
source activate stan
(stan) pip install pystan
(stan) pip install gcc
verify your gcc version:
gcc --version
gcc (GCC) 4.8.5

To solve this problem, I uninstalled my existing python 3.7 and anaconda. I re-installed anaconda with one key difference.
I registered Anaconda as my default Python 3.7 during the Anaconda installation. This lets visual studio, PyDev and other programs automatically detect Anaconda as the primary version to use.

I tried to import fbprophet on Python Anaconda, however, I got some errors.
This code works for me..
conda install -c conda-forge/label/cf201901 fbprophet

(Short n Sweet) For Mac users :
pip3 uninstall pystan
pip3 install pystan==2.17.1.0
pip3 install fbprophet

I used the following steps to install fbprophet 0.7.1 on windows 10 (2022-03-10):
Install anaconda here.
Install pystan by following this guide. The main line I used was conda install libpython m2w64-toolchain -c msys2. Then, install pystan using pip install pystan
Check your installation by running the following in a python terminal:
>>> import pystan
>>> model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
>>> model = pystan.StanModel(model_code=model_code)
>>> y = model.sampling().extract()['y']
>>> y.mean() # with luck the result will be near 0
If the above works, proceed to install fbprophet with pip install fbprophet
Hope this works for you!

If all of the answers did not work lets clone pystan and do not use the above solutions:
git clone --recursive https://github.com/stan-dev/pystan.git
cd pystan
python setup.py install

It looks like fbprophet renamed to prophet on the FB side, so this command worked for me (Windows 10 + VSCode + Python 3.10.2)
pip install prophet --no-cache-dir

Related

How do I install the shap module on Mac?

I am trying to install the shap package and keep getting the following error
ModuleNotFoundError: No module named 'shap'
I have typed the following into my notebook as well as terminal
!conda install -c conda-forge shap
!conda install shap --yes
Here are the lines of the that are erroring out
!pip install shap
import shap
explainer = shap.TreeExplainer(model)
shap_values = explainer.shap_values(X)
I am currently on a Mac
I got same issue using pip install shap command. However, conda install worked. I use Mac.
conda install -c conda-forge shap
I am on Mac OS Big Sur with pip 21.2.4 and Python 3.8.9. I am able to install shap with the following command.
ARCHFLAGS="-arch x86_64" pip3 install shap
This about a similar issue.It may help you.
Modules are installed using pip on OSX but not found when importing
If the above doesn't work, Try this:
uninstall and reinstall SHAP
Update Numpy to the latest version, then:
pip install git+https://github.com/slundberg/shap.git
if the above doesn't work, then maybe this:
To install shapely (https://pypi.org/project/Shapely/)? In python, you can install shapely by doing
pip install shapely
For windows shapley can be installed by downloading .whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely and do
pip install <name of whl file>
or if you are using anaconda you can use conda-forge to get shapely
conda config --add channels conda-forge
conda install shapely

How do I install scitools module on Python3 with Anaconda?

I need to install the scitools module in Anaconda. The commands
conda install scitools
conda install --channel johannr scitools
conda install -c asmeurer scitools
don't work. I'm using Python 3 on Windows 10. I would appreciate any help.
The packages you are trying to install are only available for linux and osx, you can try with this one:
conda install -c krisvanneste scitools_no_easyviz
Though as the name states it seems to not have support for EasyViz

How to install fbprophet for Python 3.7 (anaconda distribution)

I attempted to use fbprophet for time series analysis using Python.
I ran from fbprophet import Prophet but got No module named 'fbprophet'
I think fbprophet is not part of packages that comes with anaconda distribution
I went ahead to install fbprophet but got this error message No module named 'fbprophet'
I am on Windows 10, 64 bits
I install anaconda distribution of anaconda 3.7
I have ran conda install -c conda-forge fbprophet and conda install -c conda-forge/label/cf201901 fbprophet on my anaconda prompt which it rolled endlessly
I have also ran pip install fbprohet which did not work as well
I ran pip list which worked but prophet or fbprophet not among the list
I have searched this site for relevant questions and tried all what I clues I got in it but did not work for me.
Option 1
conda install -n [NameOfVEnv] -c conda-forge fbprophet
Where -c stands for "channel" which is
the locations where Navigator and conda look for packages. (Source)
and -n for "Name of environment".
I just tried here (on CentOS 7) and it worked fine.
Option 2
An alternative, if one is using Windows 10, is to access Anaconda Prompt for the environment that you are working with as admin:
And run
conda install -c conda-forge fbprophet
I just tried here (on Windows 10 64-bit) and it worked fine.
Option 3
Prophet is on PyPI, so you can use pip to install it (Source)
# bash
# Install pystan with pip before using pip to install fbprophet
$ pip install pystan
$
$ pip install fbprophet
You may need to install dependencies (in both options), but it asks you in the prompt window. If it appears, you will need to enter Y.
I installed this way:
pip install pystan==2.19.1.1
then:
pip install prophet
It seems that currently pystan version 3 is not working properly.
(Tested on MacOS)
You can check this official github link where the detailed steps for installation is given. This library is supported only in Python 3.
Open cmd, run this command -
pip install pystan==2.19.1.1
Then run this-
pip install prophet
First install
pip install httpstan
Then Install
pip install pystan
Then Install
pip install fbprophet
I had the same issue, but none of the answers mentioned here worked (Windows 10 machine). What worked was the following:
conda config --add channels conda-forge
conda install anaconda
Above step took almost 25 hours for me. Do above only if you get this error "The environment is inconsistent, please check the package plan carefully"
pip install pystan==2.19.1.1
conda install python=3.8 (fbprophet did not work on Python 3.9)
conda install numpy=1.19.0
conda install fbprophet=0.7.1
you just search the wrong letter, please enter pip search fbprophet,in the way, i can get two
fbprophet did not work on Python 3.9
It is a very important information, after downgrading Python from 3.9 to 3.8, I use 'conda install fbprophet' install fbprophet successfully
Use conda install gcc to set up gcc. The easiest way to install Prophet is through conda-forge: conda install -c conda-forge prophet.

Install Cartopy & dependencies on Windows

I want to install Cartopy on Windows, which has some dependencies according to http://scitools.org.uk/cartopy/docs/latest/installing.html#installing.
When using pip install cartopy in the cmd prompt, it gives an error where it wants me to install GEOS 3.3.3 and Proj4 4.9.0.
I've downloaded geos-3.6.2.tar.bz2, but I cannot figure out how to install it. I've extracted the files, used cd to the right directory.
What can I do to install it correctly?
Is there an easy way to install Cartopy?
Do you have Anaconda?
try:
conda install -c scitools cartopy
When you are installing through pip then better install using Binary file .Whl extension file
You can find all the package binary file below.
Especially in case of Cartopy installation through pip, install cartopy using binary wheel file.
https://www.lfd.uci.edu/~gohlke/pythonlibs/
If you are on Windows and you have installed Anaconda, on your search, type "Anaconda prompt" and then type this command
conda install -c conda-forge cartopy
I tried conda install -c conda-forge cartopy
and tried installing it through Anaconda navigator 1.9.12 and I scoured multitude of ways and tried them all and failed. Only this
conda install -c scitools cartopy
works.
I first ran this conda update -n base -c defaults condo following instructions provided among responses here:Updating Anaconda fails: Environment Not Writable Error

Installed Anaconda 4.3.1 (64-bit) which contains Python 3.6 but pip3 missing, cannot install tensorflow

I downloaded the latest stable Anaconda install off the Continuum website which turned out to be Anaconda 4.3.1 (64-bit) and comes with Python 3.6.0. I am in a Windows 10 environment.
However pip3 is missing and I cannot install any Python 3.x packages via pip3.
What am I doing wrong?
If you do not have another environment installed python 3+ will default to just pip I believe since pip3 is just an alias for pip.
pip install --upgrade pip
or You can do it with the associated Python binary too; if it executable as python3, then use that:
python3 -m pip install --upgrade pip
after that check:
pip --version
otherwise just try pip-3.6
for tensorflow on conda:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl
for python 3.6 due to conda providing the 3.5 one: from
pip install https://testpypi.python.org/packages/db/d2/876b5eedda1f81d5b5734277a155fa0894d394a7f55efa9946a818ad1190/tensorflow-0.12.1-cp36-cp36m-win_amd64.whl
Since this wheel had a version that is undesirable we could instead install
the wheel directly from gohlke's windows binaries repository :
download the wheel for python 3.6 from here and then install the wheel:
cd to the directory containing .whl file:
pip install some-package.whl
easy_install pip
I used it, for the problem of pip installation in miniconda.
sometimes the pip is not properly installed but it claims yes
Solution:- (Note:- This will surely work for all!!)
Step 1:- conda search python
Step 2:- conda install python=3.5.2
Step 3:- pip install tensorflow
Step 4:- import tensorflow as tf
I have Windows10, 64bit, Anaconda4.3 with Python 3.6.
Karthik' soluton worked for me. Before that I tried everything including "conda create -n tensorflow python=3.5", but it did not work (although "python --version" gave 3.5.3).
you should be able to install tensorflow using
$ conda install -c conda-forge tensorflow

Categories