CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.67k stars 7.86k forks source link

Freshman needs help! How can I build up the environment? #348

Closed MiceXH closed 7 years ago

MiceXH commented 7 years ago

Hi,man.I'm a Chinese reader of your book.It's pretty good,but it's not that friendly to freshman. I have trouble for the very first example.I've installed the anaconda to install the pymc,(btw I'm using pycharm on macos).Does the project must be run on jupyter? I just copy the code in the book and run it in pycharm,but it doesn't work. Here is the error"AttributeError: Unknown property colors". OMG,just give the poor freshman some help,PLEASE.

syzer commented 7 years ago

Isn't that question more about how to use python, and not this book?

jaymzcd commented 7 years ago

These are python notebooks - you won't be able to just paste it into Pycharm and get it to work automatically (Pycharm for what it's worth does support running jupyter notebooks if you follow the steps). From how you describe the issue and the error it sounds like you are extremely new to python in general.

It would be worth doing some basic python tutorials first to get any value out of the notebooks themselves (otherwise you can simply read them within Github as it supports viewing them non interactively).

If still interested in running them, you are probably best off just:

  1. Open the Terminal app
  2. Change directory (cd) to the folder where you have downloaded the entire project
  3. Run jupyter notebook
  4. Open your browser to the link it will have printed in the terminal
  5. Navigate to the relevant notebook you want to run

This assumes that the jupyter command here is the one that has shipped with Annaconda and is in your $PATH.

If none of that makes much sense I would recommend working through the beginners guides to jupyter first. There are a lot of resources and guides to this, eg. this youtube video if you prefer to follow along.

MiceXH commented 7 years ago

@jaymzcd Thank you for your patient reply.

CamDavidsonPilon commented 7 years ago

Thanks @jaymzcd!