简体   繁体   English

Pystan -- Library\\mingw-w64\\bin\\gcc.exe' 失败,退出代码为 1

[英]Pystan -- Library\\mingw-w64\\bin\\gcc.exe' failed with exit code 1

I would like to test orbit-ml package but I have same issues with pystan My settings are: Windows10, Anacaonda, Python 3.7 (or 3.8) When I run this demo code:我想测试 orbit-ml 包,但我与 pystan 有同样的问题 我的设置是:Windows10、Anacaonda、Python 3.7(或 3.8) 当我运行此演示代码时:

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

I had this error: CompileError: command 'C:\Users\XXX\Anaconda3\envs\orbit-ml-py37\Library\mingw-w64\bin\gcc.exe' failed with exit code 1我有这个错误:CompileError: command 'C:\Users\XXX\Anaconda3\envs\orbit-ml-py37\Library\mingw-w64\bin\gcc.exe' failed with exit code 1

I installed orbit-ml following the official documentantion.我按照官方文档安装了 orbit-ml。 I had problem with pystan (MSVC compiler is not supported) and I followed step by step the documentation link我遇到了 pystan 的问题(不支持 MSVC 编译器),我一步一步地按照文档链接

After that no warning on MSVC but the code stops with this error:之后 MSVC 上没有警告,但代码因此错误而停止:

CompileError: command 'C:\Users\XXX\Anaconda3\envs\orbit-ml-py37\Library\mingw-w64\bin\gcc.exe' failed with exit code 1 CompileError: 命令 'C:\Users\XXX\Anaconda3\envs\orbit-ml-py37\Library\mingw-w64\bin\gcc.exe' 失败,退出代码为 1

I don't understand.我不明白。 Do you have any suggestions?你有什么建议吗? All the best祝一切顺利

I am facing the very same issue.我面临着同样的问题。 However, I haven't been able to solve it.但是,我一直无法解决它。 Even if I look at the changes with new releases of pystan , I am getting an error which does not allow me to install stan.即使我查看新版本的pystan的变化,我也会收到一个不允许我安装 stan 的错误。 "ERROR: No matching distribution found for stan" “错误:找不到与 stan 匹配的分布”

There seems to be some dependency related problem.似乎存在一些依赖相关的问题。 Solving this could be a hard thing.解决这个问题可能是一件困难的事情。 If you want to get started, try the following如果您想开始,请尝试以下操作

Observations观察

From your code snippet, I have observed the following:从您的代码片段中,我观察到以下内容:

  1. import pystan does not work in recent versions (as per reference ) import pystan在最新版本中不起作用(根据参考资料
  2. There could be issues with StanModel in the libraray.库中的StanModel可能存在问题。 Check reference检查参考

Suggestions建议

Few alternatives to get to started with other approaches by bypassing the process are:通过绕过该过程开始使用其他方法的替代方案很少:

  1. Try google colab to get started.尝试使用 google colab 开始。 Go to Google colab and experiment there转到Google colab并在那里进行实验
  2. Try a linux/ubuntu VM using docker and install there.尝试使用 docker 的 linux/ubuntu VM 并在那里安装。

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:命令“ c:\\\\ mingw \\\\ bin \\\\ gcc.exe”失败,退出状态为1 - error: command 'c:\\mingw\\bin\\gcc.exe' failed with exit status 1 安装MinGW 64bit以用于Kivy-解压缩的文件不包含带有“ gcc.exe”的“ bin”文件夹 - Install MinGW 64bit For Use With Kivy - Unzipped file does not contain “bin” folder with “gcc.exe” MinGW-W64 安装中缺少 /bin 文件夹 - Missing /bin folder from MinGW-W64 installation 调用MinGW-w64编译库的函数时,Windows的Python挂起 - Python for Windows hang while calling a function of MinGW-w64 compiled library pystan:CompileError:命令'gcc'失败,退出状态为1(Windows) - pystan: CompileError: command 'gcc' failed with exit status 1 (Windows) PyStan:CompileError:命令“gcc”失败,退出状态为 1(macos) - PyStan: CompileError: command 'gcc' failed with exit status 1 (macos) pystan:distutils.errors.CompileError:命令“ gcc”失败,退出状态为1 - pystan: distutils.errors.CompileError: command 'gcc' failed with exit status 1 MySQL for Python编译器MinGW32 gcc.exe错误:找不到CreateProcess文件或目录 - Mysql for Python compiler MinGW32 gcc.exe error: CreateProcess file or directory not found Python:在 Windows 上选择 C++ 编译器 — MS Visual Studio 到 Mingw-w64。 (PyStan 编译错误) - Python: Choosing C++ compiler on Windows — MS Visual Studio to Mingw-w64. (PyStan CompileError) SQLite 使用 mingw-w64 编译扩展 Windows x64 - SQLite compiling extension Windows x64 with mingw-w64
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM