我在與 file 相同的作業目錄中執行以下命令worker.py:
poetry run worker.py
終端:
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/composite_key/compositekey$ poetry run worker.py
FileNotFoundError
[Errno 2] No such file or directory: b'/snap/bin/worker.py'
at /usr/lib/python3.8/os.py:601 in _execvpe
597│ path_list = map(fsencode, path_list)
598│ for dir in path_list:
599│ fullname = path.join(dir, file)
600│ try:
→ 601│ exec_func(fullname, *argrest)
602│ except (FileNotFoundError, NotADirectoryError) as e:
603│ last_exc = e
604│ except OSError as e:
605│ last_exc = e
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/composite_key/compositekey$ ls
Citizenship.csv __pycache__ dagster.yaml pytest.ini simulate_alien_dict.py tasks.py
"Gordian Algorithms' Times.xlsx" config.yaml data run_pipeline.yaml simulate_data.ipynb tests
__init__.py currency_symbols_map.json modules simulate_alien_dict.ipynb simulate_data.py worker.py
顯然,我們看到檔案在那里(右下角)。
問題
- 為什么會出現這個問題?
- 以后如何解決這個問題?
如果還有什么我應該添加到帖子中,請告訴我
uj5u.com熱心網友回復:
poetry run 意思是“在由詩歌管理的 venv 中運行以下命令”。
因此,在您的情況下使用它的正確方法是: poetry run python worker.py
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/329054.html
上一篇:AWSGlue將列值添加為另一個DynamicFrame中的列
下一篇:使用for回圈初始化字典
