问题描述
当我更新我的环境变量(我使用vim来编辑〜/ .bashrc)时,PyCharm不会立即获取更新,我必须关闭程序,再次关闭源代码/ .bashrc,然后重新打开PyCharm任何方式让PyCharm自动或不关闭更改源?
当任何进程被创建时,它会从它的父进程继承环境变量(在你的情况下是操作系统本身)。如果您在父级别更改环境变量,则子进程不知道。
PyCharm允许您从Run\Debug配置更改环境变量窗口。
运行>编辑配置>环境变量 - >
when I update my environmental variables (I use vim to edit ~/.bashrc) PyCharm does not get the updates right away, I have to shut down the program, source ~/.bashrc again, and re-open PyCharm
Any way to have PyCharm source the changes automatically or without shutting down?
When any process get created it inherit the environment variables from it's parent process (the O.S. itself in your case). if you change the environment variables at the parent level, the child process is not aware of it.
PyCharm allows you to change the environment variables from the Run\Debug Configuration window.Run > Edit Configurations > Environment Variables ->
这篇关于pycharm不更新环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!