How to check your PYTHONPATH environment variable

You can check your PYTHONPATH environment variable with:

  1. Using the command line/terminal:

Open a command line/terminal and enter the following command:

import sysprint(sys.path)

This will print out the current PYTHONPATH environment variable.

  1. Using a Python script:

You can also create a Python script that contains the following code:

import sysprint(sys.path)

Then run the script in the command line/terminal to view the PYTHONPATH environment variable.

おすすめ

転載: blog.csdn.net/weixin_42599558/article/details/129502581
おすすめ