Bootstrap Chameleon Logo

Install 3rd Packages part two

Using Method 1 to install 3rd packages in the engine directory can be inconvenient if there is any of the following: - This machine is on the internal LAN and cannot connect to the Internet. - Often sync Engine from internal Engine Team, prefer keeping a pure engine. - The same engine will use different versions of the 3rd packages for different projects. - Prefer binding the 3rd-packages to project rather than the engine.

Steps: 1. Install the 3rd package in venv or pyCharm. 2. Copy these packages (including the other packages that depend on) to: <Your_Project>/TA/Python/Lib/Site-packages 3. In the python file, add the path to sys. For instance

    import sys
    import os

    sys.path.append(os.path.join(os.path.dirname(__file__), '../../Lib/site-packages')) # 根据实际路径修改
    import numpy as np