首页 > 新闻中心 > 技术百科

windows pythonpath,怎么编辑python文件 返回列表

网络2023-08-27 00:00:00编辑发布,已经有个小可爱看过这篇文章啦

pythonpath在哪

You are here because you are using:

您在这里是因为您正在使用:

Windows OS version 10+

Windows OS版本10+ Python version 3.3+

Python版本3.3+ Anaconda3

Python3

And you would like to edit your PYTHONPATH permanently.

您想永久编辑您的PYTHONPATH 。

TL; DR (TL;DR)

Go to C:\\Users\\\\Anaconda3\\Lib\\site-packages

转到C:\\Users\\\\Anaconda3\\Lib\\site-pa cks

Create a file python37.pth

创建一个文件python37.pth

Edit the file to include this line C:\\\\Users\\\\\\\\my_module

编辑文件以包括此行C:\\\\Users\\\\\\\\my_模块

加长版; 阅读 (The Long version; Do Read) 序幕 (Prologue)

In most cases, editing the PYTHONPATH from the Settings GUI will do the trick. The trick is well explained in this Stack Overflow answer.If in the first place you are only looking to edit your path

locally

, this helpful answer will do.

在大多数情况下,从设置GUI编辑PYTHONPATH 。 这个技巧在Stack Overflow答案中得到了很好的解释。如果首先,您只是想在

本地

编辑路径,那么这个有用的答案就可以了。

略有扩展 1个 (Slightly Extended Item no. 1)

If you don’t have C:\\Users\\\\Anaconda3\\Lib\\site-packages, replace C:\\Users\\ with the path to your Anaconda3.

如果您没有C:\\Users\\\\Anaconda3\\Lib\\site-pa您的C:\\Users\\\\Anaconda3\\Lib\\site-pa place C:\\Users\\

  • 很好
  • 就可以
  • 您的
  • 为您
  • 您在
  • 创建一个
  • class
  • 转到
  • 您想
  • 联网

热门新闻

来电咨询