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

Install error in Pymc: module 'pymc' has no attribute 'stochastic_from_dist' #204

Closed ChenghuFeng closed 2 years ago

ChenghuFeng commented 2 years ago

Hi here, I am a biggner in python, and I try to install pymc and meet some error, which another package(kabuki) could not find stochastic_from_dist from pymc

  1. File "F:\python310\lib\site-packages\kabuki\utils.py", line 312, in HalfCauchy = pm.stochastic_from_dist(name="Half Cauchy", AttributeError: module 'pymc' has no attribute 'stochastic_from_dist'

Versions and main components

ricardoV94 commented 2 years ago

That other package most likely does not support the new version of PyMC. You should install pymc3 or if that is a really really old package pymc < 4

ChenghuFeng commented 2 years ago

Emmm,I have ‘pymc3-3.11.5-py3-none-any.whl’ but when I try to change (import pymc as pm) to (import pymc3 as pm), this problem still exist, error like AttributeError: module 'pymc3' has no attribute 'stochastic_from_dist'

ChenghuFeng commented 2 years ago

Interestingly, I can successfully import pymc or pymc3, so I wonder whether the name of "stochastic_from_dist" was replaced by anthor name~

ricardoV94 commented 2 years ago

That library relies on a very old version of pymc. You will have to downgrade by doing python -m pip install pymc<4

ChenghuFeng commented 2 years ago

lol, I try “python -m pip install pymc<4” from (pymc == 2) to (pymc == 2.3.8), but both of them can not install. And I find they work on linux or macosx. Is there any version can directly install by ‘python -m pip install pymc<4’,Thank ~

ricardoV94 commented 2 years ago

@ChenghuFeng You should ask for installation help in the the library repository https://github.com/hddm-devs/kabuki

We no longer support that version of PyMC here.

twiecki commented 2 years ago

@ChenghuFeng Did you follow the HDDM install instructions? Best to email the HDDM mailing list.

ChenghuFeng commented 2 years ago

Thank for suggestion, I try it now ( follow the HDDM install instructions)

ChenghuFeng commented 2 years ago

@ricardoV94 @twiecki Thanks for all your suggestion. I try to downgrade my python to 3.8, and it work~ I thought maybe I install a package with wrong version before~