Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/install/from_source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ Leaving the build environment ``tvm-build-venv``, there are two ways to install
.. code-block:: bash

export TVM_HOME=/path-to-tvm
export PYTHONPATH=$TVM_HOME/python:$PYTHONPATH
pip install $TVM_HOME/3rdparty/tvm-ffi
export PYTHONPATH=$TVM_HOME/python:$TVM_HOME/3rdparty/tvm-ffi/python:$PYTHONPATH
Comment on lines +166 to +167
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using an editable install (pip install -e) for tvm-ffi is a more robust approach for a source-based installation. It registers the necessary package metadata to resolve the PackageNotFoundError while keeping the package linked to the source directory. This ensures that tvm-ffi stays in sync with your source tree (e.g., after a git pull) and removes the need to manually add its path to PYTHONPATH. Having the same package in both site-packages and PYTHONPATH is redundant and can lead to import conflicts or version mismatches.

Suggested change
pip install $TVM_HOME/3rdparty/tvm-ffi
export PYTHONPATH=$TVM_HOME/python:$TVM_HOME/3rdparty/tvm-ffi/python:$PYTHONPATH
pip install -e $TVM_HOME/3rdparty/tvm-ffi
export PYTHONPATH=$TVM_HOME/python:$PYTHONPATH


- Install via pip local project

Expand Down