pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

Why can't PyMC be installed on MAC? #202

Closed HeBe-lab closed 2 years ago

HeBe-lab commented 3 years ago

Hello teacher, I am HeBe. I want to know why PyMC cannot be installed in Apple system? I tried to build pymc using pip install pymc, but it failed.The following error occurred .

ERROR: Command errored out with exit status 1: command: /Users/caoxingxing/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gp/3jwsx6yj1hz1rgsjb9yhrnvh0000gn/T/pip-install-9psedhkz/ pymc_aae48aeefa3142d8bfc5c72105bf13a5/setup.py'"'"'; file='"'"'/private/var/folders/gp/ 3jwsx6yj1hz1rgsjb9yhrnvh0000gn/T/pip-install-9psedhkz/ pymc_aae48aeefa3142d8bfc5c72105bf13a5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open) (file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/gp/3jwsx6yj1hz1rgsjb9yhrnvh0000gn/T/pip-wheelq6fjas1n cwd: /private/var/folders/gp/3jwsx6yj1hz1rgsjb9yhrnvh0000gn/T/pip-install-9psedhkz/ pymc_aae48aeefa3142d8bfc5c72105bf13a5/ Complete output (1014 lines): running bdist_wheel running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building extension "pymc.flib" sources f2py options: ['skip:ppnd7'] adding 'build/src.macosx-10.9-x86_64-3.8/build/src.macosx-10.9-x86_64-3.8/pymc/fortranobject.c' to sources.

twiecki commented 3 years ago

Are you sure that you don't want PyMC3 https://github.com/pymc-devs/pymc3? This project is not lo longer developed.

HeBe-lab commented 3 years ago

This is mainly because my research needs to use PyMC. If there is no PyMC model, using FitMC will not be possible.

bao2022 commented 2 years ago

I have the same problem. I tried to install this pymc==2.3.8 on Mac M1 chip because I have the code for this version. It looks like a gfortran issue (I am using brew install gfortran), can you help fix the issue? Thank you! Here is part of the error message: Collecting pymc Using cached pymc-2.3.8.tar.gz (385 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: pymc Building wheel for pymc (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/t/opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tc/kbzvy3xd4rb5ty_c78l9zqjc0000gn/T/pip-install-w6fe5mq3/pymc_21ead4fedd614b2fbd4fd80c17aa9517/setup.py'"'"'; file='"'"'/private/var/folders/tc/kbzvy3xd4rb5ty_c78l9zqjc0000gn/T/pip-install-w6fe5mq3/pymc_21ead4fedd614b2fbd4fd80c17aa9517/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/tc/kbzvy3xd4rb5ty_c78l9zqjc0000gn/T/pip-wheel-uz0lfch7

CCompilerOpt._cache_write[796] : write cache to path -> /private/var/folders/tc/kbzvy3xd4rb5ty_c78l9zqjc0000gn/T/pip-install-w6fe5mq3/pymc_21ead4fedd614b2fbd4fd80c17aa9517/build/temp.macosx-10.9-x86_64-3.9/ccompiler_opt_cache_ext.py

ERROR: Failed building wheel for pymc

twiecki commented 2 years ago

Why pymc 2.3.8? The most recent version is 4.0.0b1. If you do need pymc 2, I'm not surprised it's not working on M1.

ghost commented 2 years ago

It should be easy to convert your model over to v3 or v4. If you need help, please visit our Discourse site and post any questions you may have.