Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error in installing Pystan
#1
Hi!
Please, help: I want to install Pystan (I need it to install fbprophet) I have Windows 10, Python2.7, Microsofr Visual C++ Compiler Package for Python 2.7, wheel

When I try "pip install pystan" there is an error:

running build_ext
building 'pystan._api' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\pystan
creating build\temp.win-amd64-2.7\Release\pystan\stan
creating build\temp.win-amd64-2.7\Release\pystan\stan\src
creating build\temp.win-amd64-2.7\Release\pystan\stan\src\stan
creating build\temp.win-amd64-2.7\Release\pystan\stan\src\stan\lang
creating build\temp.win-amd64-2.7\Release\pystan\stan\src\stan\lang\grammars
C:\Users\User\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_NO_DECLTYPE -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_RESULT_OF_USE_TR1 -DFUSION_MAX_VECTOR_SIZE=12 -I.\pystan -Ipystan/stan/src -Ipystan/stan/lib/stan_math/ -Ipystan/stan/lib/stan_math/lib/eigen_3.3.3 -Ipystan/stan/lib/stan_math/lib/boost_1.69.0 -Ipystan/stan/lib/stan_math/lib/sundials_4.1.0/include -Ic:\python27\include -Ic:\python27\PC /Tppystan/_api.cpp /Fobuild\temp.win-amd64-2.7\Release\pystan/_api.obj /EHsc -DBOOST_DATE_TIME_NO_LIB /std:c++14
cl : Command line warning D9002 : ignoring unknown option '/std:c++14'
_api.cpp
pystan/stan/src\stan/lang/generator/write_begin_all_dims_col_maj_loop.hpp(77) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/write_begin_param_elements_loop.hpp(81) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/write_var_decl_arg.hpp(65) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(262) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(266) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(321) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(332) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(350) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(360) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(379) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/statement_visgen.hpp(385) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/generate_param_names_array.hpp(32) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/generate_param_names_array.hpp(54) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/generate_set_param_ranges.hpp(53) : warning C4258: 'i' : definition from the for loop is ignored; the definition from the enclosing scope is used
pystan/stan/src\stan/lang/generator/generate_set_param_ranges.hpp(48) : definition of 'i' ignored
pystan/stan/src\stan/lang/generator/generate_set_param_ranges.hpp(36) : definition of 'i' used
pystan/stan/src\stan/lang/generator/generate_register_mpi.hpp(15) : error C2143: syntax error : missing ',' before ':'
pystan/stan/src\stan/lang/generator/generate_register_mpi.hpp(15) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
pystan/stan/src\stan/lang/generator/generate_register_mpi.hpp(15) : error C2143: syntax error : missing ';' before '{'
pystan/stan/src\stan/lang/generator/generate_register_mpi.hpp(16) : error C2228: left of '.first' must have class/struct/union
type is 'int'
pystan/stan/src\stan/lang/generator/generate_register_mpi.hpp(17) : error C2228: left of '.second' must have class/struct/union
type is 'int'
pystan/stan/src\stan/lang/generator/generate_unconstrained_param_names_array.hpp(37) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/src\stan/lang/generator/generate_unconstrained_param_names_array.hpp(57) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
pystan/stan/lib/stan_math/lib/boost_1.69.0\boost/phoenix/core/limits.hpp(44) : warning C4005: 'BOOST_PHOENIX_NO_VARIADIC_EXPRESSION' : macro redefinition
command-line arguments : see previous definition of 'BOOST_PHOENIX_NO_VARIADIC_EXPRESSION'
pystan/_api.cpp(1305) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
error: Command "C:\Users\User\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_NO_DECLTYPE -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_RESULT_OF_USE_TR1 -DFUSION_MAX_VECTOR_SIZE=12 -I.\pystan -Ipystan/stan/src -Ipystan/stan/lib/stan_math/ -Ipystan/stan/lib/stan_math/lib/eigen_3.3.3 -Ipystan/stan/lib/stan_math/lib/boost_1.69.0 -Ipystan/stan/lib/stan_math/lib/sundials_4.1.0/include -Ic:\python27\include -Ic:\python27\PC /Tppystan/_api.cpp /Fobuild\temp.win-amd64-2.7\Release\pystan/_api.obj /EHsc -DBOOST_DATE_TIME_NO_LIB /std:c++14" failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\user\\appdata\\local\\temp\\pip-install-89oiaz\\pystan\\setup.py'"'"'; __file__='"'"'c:\\users\\user\\appdata\\local\\temp\\pip-install-89oiaz\\pystan\\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\user\appdata\local\temp\pip-record-efhvw3\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
Reply
#2
try:
pip install pystan
Reply
#3
(Oct-04-2019, 07:42 PM)Larz60+ Wrote: I have Windows 10, Python2.7, Microsofr Visual C++ Compiler Package for Python 2.7, wheel
Its' not tester against Visual C++ compiler.
PyStan on Windows
Quote:PyStan is tested against the mingw-w64 compiler which works on both Python versions (2.7, 3.x) and supports x86 and x64.

As you should not use Python 2.7,someone has make wheel for Python 3.
Eg if have Python 3.7 in 64-bit version.
pip install pystan-2.18.0.0-cp37-cp37m-win_amd64.whl
All is inside wheel no compiler is needed.
Python 3.6/3.7 and pip installation under Windows
Reply
#4
Snippsat, thank you very much for your answer!

So what should I do is to install mingw-w64 compiler? And to uninstall Microsofr Visual C++ Compiler Package for Python 2.7?

When I didn`t have Microsofr Visual C++ Compiler Package for Python 2.7 and tried "pip install pystan", there was an error with recommendation to install "Microsofr Visual C++ Compiler Package for Python 2.7" with link where I can get it.

I want to use python 2.7, as I don`t have much experience in python and what I already learned I did with python 2.7. Is there an answer for my proplem with python 2.7?
Reply
#5
(Oct-05-2019, 09:16 AM)sveto4ka Wrote: I want to use python 2.7, as I don`t have much experience in python and what I already learned I did with python 2.7.
still better move to python3 as python2 support ends on January 1 2020
https://pythonclock.org/
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#6
Buran,
Yes, I know. I will change to Python 3 when I`ll get more experience in Python.
Now I want to use Python 2.7
Reply
#7
I solved the problem by installing Anaconda
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  error while installing any library using pip in windows AkashKansal 1 274 Sep-24-2020, 07:51 AM
Last Post: buran
  Pip prints huge error when installing p5 hayden2s 1 296 Aug-08-2020, 02:30 PM
Last Post: snippsat
  Installing Error - Python 2.7.8 saranana 2 326 Jun-04-2020, 02:25 AM
Last Post: pyzyx3qwerty
  Getting error while installing packages using pip Shreya 2 618 Apr-22-2020, 08:03 AM
Last Post: Shreya
  Error Installing PySceneDetect and OpenCV jpnoli 1 385 Mar-26-2020, 12:19 PM
Last Post: buran
  Error after installing Python3.8.2: "No module named 'apt_pkg'" Chromie 3 1,506 Mar-09-2020, 08:20 PM
Last Post: micseydel
  Error in VS Code after installing raduf 2 1,269 Dec-06-2018, 09:56 PM
Last Post: snippsat
  Error when installing module tjnichols 2 2,797 May-13-2018, 04:51 PM
Last Post: tjnichols
  Fix Memory Error while installing a library for Qgis alexastorga 0 1,189 Apr-13-2018, 04:54 PM
Last Post: alexastorga
  Ubuntu: Error installing watson-developer-cloud Python module gio123 3 2,185 Mar-15-2018, 09:39 PM
Last Post: gio123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020