You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 16.04下Python3安装目录、解释器位置及PyCharm配置咨询

Hey there! Let's walk through your questions step by step using the output from your whereis python3 command.

Python 3 Installation Directories on Ubuntu 16.04

From the whereis output you shared, here's what each directory corresponds to:

  • /usr/bin/: This holds the executable files and configuration scripts for Python 3 (like python3, python3.5, and the -config helper files).
  • /usr/lib/python3.5: This is the core standard library for Python 3.5—all built-in modules (like os, sys) are stored here.
  • /etc/python3.5: Contains system-wide configuration settings for Python 3.5, such as package installation rules.
  • /usr/local/lib/python3.5: This is where third-party packages you install (via pip3, for example) live—they're separate from the system's default library to avoid conflicts.
  • /usr/include/python3.5m//usr/include/python3.5: These are C header files required if you're compiling Python extensions or embedding Python in C/C++ code.
  • /usr/share/python3: Holds shared resources like documentation, example scripts, and data files related to Python 3.
  • /usr/share/man/man1/python3.1.gz: The manual page (man page) for Python 3—you can access it by running man python3 in the terminal.
Location of the Python 3 Interpreter (Executable File)

The actual executable for Python 3 is at /usr/bin/python3. This is typically a symbolic link pointing to the specific version installed on your system (in your case, /usr/bin/python3.5). You can confirm this link relationship by running:

ls -l /usr/bin/python3

You'll see output showing it links directly to python3.5. Both /usr/bin/python3 and /usr/bin/python3.5 work as valid interpreters—using python3 is more portable if you ever upgrade your Python version later.

Adding the Interpreter Path to PyCharm

Here's how to set up this system Python interpreter in PyCharm:

  1. Open your project in PyCharm, then go to File > Settings (or press Ctrl+Alt+S on Linux).
  2. In the left sidebar, navigate to Project: [Your Project Name] > Python Interpreter.
  3. Click the gear icon in the top-right corner of the window, then select Add.
  4. In the "Add Python Interpreter" window, choose System Interpreter from the left menu.
  5. Click the three-dot button (...) next to the interpreter path field, then browse to /usr/bin/python3 (or /usr/bin/python3.5 if you want to use the specific version explicitly).
  6. Select the file, click OK, then hit Apply and OK to save the settings.

Now PyCharm will use this system Python 3 interpreter for your project.

内容的提问来源于stack exchange,提问作者Emerdan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:29:33