Skip to content

PYTHONPATH Configuration Failure Causes AttributeError: module 'gaussdb' has no attribute 'version' #27

@setoru

Description

@setoru

Description:
In development mode, after following the configuration steps provided in the project's Readme, an AttributeError is thrown when executing the gaussdb version check command. The root cause is incomplete PYTHONPATH configuration.

How to reproduce it:

  1. Complete the development environment setup as instructed in the project's Readme
  2. Run the following command to check the gaussdb version:
python -c "import gaussdb; print(gaussdb.__version__)"
  1. The error is triggered

Logs

AttributeError: module 'gaussdb' has no attribute '__version__'

Solution:
Configure PYTHONPATH with the full paths to the required modules using the following command:

export PYTHONPATH=/home/gaussdbUser/gaussdb-python/gaussdb:/home/gaussdbUser/gaussdb-python/gaussdb_pool

Environment:

  • OS: Huawei Cloud EulerOS 2.0
  • Database: GaussDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions