Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simply-static domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121
codon编译注意项

codon编译注意项

1、需要知道python版本,which python,如果python3,则可看到具体版本

2、比如python3得到:

3、sudo find / -name “libpython*.dylib”

5、codon build -release -exe  pltco.py      

对于找不到模块的情况,以下是辅助解决方式;

1、查看已经安装的模块:pip list

2、查看模块安装位置:pip show modelname

3、查看环境变量

printenv

#VAR是具体环境变量
printenv VAR

四、Mac环境变量配置

具体说来,这就是在配置文件中添加一行定义环境变量的语句。

系统全局环境变量的配置:

修改文件 /etc/bashrc,添加环境变量定义。例如添加环境变量JAVA_HOME:

export JAVA_HOME=/usr/libexec/java_home

用户级别的自定义环境变量配置:

修改文件 ~/.bash_profile,添加环境变量定义。例如添加环境变量ANDROID_HOME:

export ANDROID_HOME=~/Library/Android/sdk

五、Mac添加环境变量

在 .bash_profile 中添加环境变量的定义。例如添加环境变量ANT_HOME:

export ANT_HOME=/usr/local/ant

添加完毕之后,记得执行下面这个命令,使之立即生效:

source ~/.bash_profile

六、Mac更改环境变量

更改环境变量的值和添加环境变量的定义类似,只需要重新赋值即可。

例如更改环境变量 JAVA_HOME 的值:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home

七、Mac怎么查看环境变量里的值

可以使用 printenv 命令查看所有环境变量的值,或者使用 echo $VAR 命令查看指定环境变量的值。

例如:

printenv JAVA_HOME
echo $JAVA_HOME

八、总结

Mac环境变量的设置可以通过直接在终端中使用 export 命令添加环境变量,或修改 Shell 配置文件进行设置。通过 printenv 命令可以查看环境变量的值,也可以使用 echo $VAR 命令查看指定环境变量的值。

对于源程序中from xxx import xx as x的处理



from python import numpy as np
from python import matplotlib.pyplot as plt
x=np.array([0,6])
y=np.array([0,100])

plt.plot(x,y)
plt.show()