Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python虚拟环境怎么使用 #144

Open
schunlee opened this issue Dec 13, 2024 · 4 comments
Open

python虚拟环境怎么使用 #144

schunlee opened this issue Dec 13, 2024 · 4 comments

Comments

@schunlee
Copy link

想问下如果想通过python虚拟环境去执行py脚本的话,应该怎么写"命令"

@iwannay
Copy link
Owner

iwannay commented Dec 13, 2024

python -c
或者python3 -c

@schunlee
Copy link
Author

python -c 或者python3 -c

我刚才反应过来可以写成bat或者bat。
类似这样cd C:\Users\Administrator\PycharmProjects\new_dataware_house\ && C:\Users\Administrator\PycharmProjects\new_dataware_house\venv\Scripts\python.exe yjgk_executor.py

@iwannay
Copy link
Owner

iwannay commented Dec 13, 2024

python -c 或者python3 -c

我刚才反应过来可以写成bat或者bat。 类似这样cd C:\Users\Administrator\PycharmProjects\new_dataware_house\ && C:\Users\Administrator\PycharmProjects\new_dataware_house\venv\Scripts\python.exe yjgk_executor.py

是的,这样也可以

@schunlee
Copy link
Author

python -c 或者python3 -c

我刚才反应过来可以写成bat或者bat。 类似这样cd C:\Users\Administrator\PycharmProjects\new_dataware_house\ && C:\Users\Administrator\PycharmProjects\new_dataware_house\venv\Scripts\python.exe yjgk_executor.py

是的,这样也可以

请问下您说的python -c 这种方式怎么用虚拟环境调用py脚本,谢谢,感觉这种应该更优雅些

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants