Traceback (most recent call last): File "/home/xwt/.conda/envs/smpl/bin/pip", line 5, in <module> from pip._internal.cli.main import main ImportError: No module named main
解决方法:
这时直接打开终端,在终端中输入
sudo gedit /home/xwt/.conda/envs/smpl/bin/pip
这时打开了pip文件,修改
from pip import main
if __name__ == '__main__':
sys.exit(main())
为
from pip import __main__ //修改
if __name__ == '__main__':
sys.exit(__main__._main())//修改