我已经安装了anaconda但没有添加到bashrc。
在终端I中键入:
export PATH="/home/my_pc/anaconda3/bin:$PATH"
然后python
一切正常。
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
但是当我关闭终端时,一切都会返回旧配置:
my_pc@y_pc:~$ conda
conda: command not found
my_pc@my_pc:~$ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
如何保存新的导出PATH配置?
答案 0 :(得分:0)
您应该将其添加到tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
if (getName() == 'compileDemoDebugKotlin')
dependsOn(':app:generateDemoDebugProto')
if (getName() == 'compileDemoReleaseKotlin')
dependsOn(':app:generateDemoReleaseProto')
if (getName() == 'compileProdDebugKotlin')
dependsOn(':app:generateProdDebugProto')
if (getName() == 'compileProdReleaseKotlin')
dependsOn(':app:generateProdReleaseProto')
}
或.bashrc
文件中:
.bash_profile
答案 1 :(得分:0)
这应该适合你:
# Permanent change that requires logging out
echo 'export PATH="/home/my_pc/anaconda3/bin:$PATH"' >> ~/.bash_profile
或者,如果您愿意:
# ~/.bashrc is sourced every time you launch a new terminal, so no need for logging out
echo 'export PATH="/home/my_pc/anaconda3/bin:$PATH"' >> ~/.bashrc