anaconda python 的路径是什么,需要哪些环境变量?
我对 Python 编码比较陌生,经常遇到设置环境变量和 PATH 的情况,但从未真正理解它的含义。
什么是环境变量,为什么我们需要指定 PATH,它如何链接到 conda 环境,最后:我需要添加哪些路径才能正常运行 miniconda 安装?
I am relatively new to Python coding, and have bumped into setting environment variables and PATH often, but never really understood the meaning of it.
What is an environment variable, why do we need to specify a PATH, how is this linked to conda environments and, at the end of the day: which paths do I need to add in order to have a properly functioning miniconda installation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
什么是环境变量
顾名思义,它是一个可以从环境中的多个应用程序访问的变量,例如我的 C 程序和 python 程序都可以读取 PATH 并知道主文件夹在哪里,
为什么我们需要指定 PATH
系统需要知道东西安装在哪里,因此当它查找模块/lib/文件时,它将在正确的位置搜索,这也是管理多台计算机上的文件夹结构的简单方法。每个用户都可以保存他所在的位置,但最终位置将是 PATH/文件/结构
这如何链接到 conda 环境,并且在一天结束时
每个 conda“env” 都可以被视为不同的 PATH 设置,因此在 anaconda 下您将拥有 anaconda/myenv1/packages 或 anaconda/myenv2/packages 文件夹,当您激活 myenv1 时,您将 PATH 更改为 anaconda/myenv1
我需要按顺序添加哪些路径有一个正常运行的 miniconda 安装?
按照您收到的错误进行操作,并将库的路径添加到 PATH="lib1:lib2:etc"
What is an environment variable
As the name suggest its a variable that can be accessed from multiple application on the environment, for example both my C program and python program can read PATH and know where the main folder is
why do we need to specify a PATH
The system need to know where thing are installed so when it will look for modules/lib/file it will search at the correct location, also its an easy way to manage a folder structure on multiple computers. each user can save where he whats but the final location will be PATH/file/structure
how is this linked to conda environments and, at the end of the day
Each conda "env" can be viewed as a different PATH setting so under the anaconda folder you will have anaconda/myenv1/packages or anaconda/myenv2/packages and when you are activating myenv1 you change the PATH to be anaconda/myenv1
which paths do I need to add in order to have a properly functioning miniconda installation?
follow the errors you get and add the paths of the libs to PATH="lib1:lib2:etc"