Open zhaole0451 opened 2 years ago
平台:vscode,liunx
程序: import sys,os sys.path.append("/othercode/lizi/1/AllNewsSpider/pengpai") print(sys.path) print(os.path.realpath('.')) import pengpai_news_spider pengpai_news_spider.main() 控制台: (mypy366) coder@codercom-code-server1:/othercode/lizi/1/AllNewsSpider/pengpai$ /home/coder/micromamba/envs/mypy366/bin/python /othercode/lizi/1/AllNewsSpider/pengpai/runner.py ['/othercode/lizi/1/AllNewsSpider/pengpai', '/home/coder/micromamba/envs/mypy366/lib/python36.zip', '/home/coder/micromamba/envs/mypy366/lib/python3.6', '/home/coder/micromamba/envs/mypy366/lib/python3.6/lib-dynload', '/home/coder/micromamba/envs/mypy366/lib/python3.6/site-packages', '/othercode/lizi/1/AllNewsSpider/pengpai'] /othercode/lizi/1/AllNewsSpider/pengpai Traceback (most recent call last): File "/othercode/lizi/1/AllNewsSpider/pengpai/runner.py", line 13, in import pengpai_news_spider ModuleNotFoundError: No module named 'pengpai_news_spider'
同问
平台:vscode,liunx
程序: import sys,os sys.path.append("/othercode/lizi/1/AllNewsSpider/pengpai") print(sys.path) print(os.path.realpath('.')) import pengpai_news_spider pengpai_news_spider.main() 控制台: (mypy366) coder@codercom-code-server1:/othercode/lizi/1/AllNewsSpider/pengpai$ /home/coder/micromamba/envs/mypy366/bin/python /othercode/lizi/1/AllNewsSpider/pengpai/runner.py ['/othercode/lizi/1/AllNewsSpider/pengpai', '/home/coder/micromamba/envs/mypy366/lib/python36.zip', '/home/coder/micromamba/envs/mypy366/lib/python3.6', '/home/coder/micromamba/envs/mypy366/lib/python3.6/lib-dynload', '/home/coder/micromamba/envs/mypy366/lib/python3.6/site-packages', '/othercode/lizi/1/AllNewsSpider/pengpai'] /othercode/lizi/1/AllNewsSpider/pengpai Traceback (most recent call last): File "/othercode/lizi/1/AllNewsSpider/pengpai/runner.py", line 13, in
import pengpai_news_spider
ModuleNotFoundError: No module named 'pengpai_news_spider'