错误如下:
Traceback (most recent call last):
... ...
import sys, os, re, subprocess
File "/N/u/xulitang/Carbonate/anaconda3/lib/python3.7/subprocess.py", line 152, in <module>
import _posixsubprocess
ImportError: dynamic module does not define module export function (PyInit__posixsubprocess)
-------------------------
瞎折腾后,检查发现:
echo $PYTHONPATH 是系统自带的那个,python2的:
/N/soft/rhel7/python/2.7.13a/lib/python2.7/site-packages,
未变成 python3的,/N/u/lily/anaconda3/lib/python3.7/site-packages
但是,我的 .zshrc文件并找不到,执行下面语句应该只是自己在创造了个文件:
vim ~/.zshrc
cat ~/.bashrc >> ~/.zshrc
未果多次后,博主强行解决方式:
export $PYTHONPATH="/N/u/lily/anaconda3/bin/:$PATH"
source ~/.bashrc
启发博文:https://bbs.archlinux.org/viewtopic.php?id=226314
解决!