Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Bản dựng ổn định
Cài đặt phiên bản mới nhất của Xác suất TensorFlow:
pipinstall--upgradetensorflow-probability
Xác suất của TensorFlow phụ thuộc vào bản phát hành ổn định gần đây của TensorFlow (gói pip tensorflow ). Xem ghi chú phát hành TFP để biết chi tiết về sự phụ thuộc giữa TensorFlow và TensorFlow Probability.
Để buộc cài đặt dành riêng cho Python 3, hãy thay thế pip bằng pip3 trong các lệnh trên. Để được trợ giúp thêm về cài đặt, hướng dẫn cài đặt các điều kiện tiên quyết và (tùy chọn) thiết lập môi trường ảo, hãy xem hướng dẫn cài đặt TensorFlow .
Công trình hàng đêm
Ngoài ra còn có các bản dựng Xác suất TensorFlow hàng đêm trong gói pip tfp-nightly , phụ thuộc vào một trong tf-nightly và tf-nightly-gpu . Bản dựng hàng đêm bao gồm các tính năng mới hơn nhưng có thể kém ổn định hơn so với bản phát hành đã được phiên bản.
Cài đặt từ nguồn
Bạn cũng có thể cài đặt từ nguồn. Điều này đòi hỏi hệ thống xây dựng Bazel . Chúng tôi khuyên bạn nên cài đặt bản dựng TensorFlow hàng đêm ( tf-nightly ) trước khi thử xây dựng Xác suất TensorFlow từ nguồn.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Install\n\nStable builds\n-------------\n\nInstall the latest version of TensorFlow Probability: \n\n```bash\npip install --upgrade tensorflow-probability\n```\n\nTensorFlow Probability depends on a recent stable release of\n[TensorFlow](https://www.tensorflow.org/install) (pip package `tensorflow`). See\nthe [TFP release notes](https://github.com/tensorflow/probability/releases) for\ndetails about dependencies between TensorFlow and TensorFlow Probability.\n| **Note:** Since TensorFlow is *not* included as a dependency of the TensorFlow Probability package (in `setup.py`), you must explicitly install the TensorFlow package (`tensorflow` or `tensorflow-gpu`). This allows us to maintain one package instead of separate packages for CPU and GPU-enabled TensorFlow.\n\nTo force a Python 3-specific install, replace `pip` with `pip3` in the above\ncommands. For additional installation help, guidance installing prerequisites,\nand (optionally) setting up virtual environments, see the [TensorFlow\ninstallation guide](https://www.tensorflow.org/install).\n\nNightly builds\n--------------\n\nThere are also nightly builds of TensorFlow Probability under the pip package\n`tfp-nightly`, which depend on one of `tf-nightly` and `tf-nightly-gpu`. Nightly\nbuilds include newer features, but may be less stable than the versioned\nreleases.\n\nInstall from source\n-------------------\n\nYou can also install from source. This requires the\n[Bazel](https://bazel.build/) build system. It is highly recommended\nthat you install the nightly build of TensorFlow (`tf-nightly`) before trying to\nbuild TensorFlow Probability from source. \n\n sudo apt-get install bazel git python-pip\n python -m pip install --upgrade --user tf-nightly\n git clone https://github.com/tensorflow/probability.git\n cd probability\n bazel build --copt=-O3 --copt=-march=native :pip_pkg\n PKGDIR=$(mktemp -d)\n ./bazel-bin/pip_pkg $PKGDIR\n python -m pip install --upgrade --user $PKGDIR/*.whl"]]