python - 在 cmd 中运行 python 脚本不会给出任何输出
问题描述
这是我在环境变量中的 python 路径
C:\Users\Kiwi\AppData\Local\Programs\Python\Python37-32\Scripts\
C:\Users\Kiwi\AppData\Local\Programs\Python\Python37-32\
如果我C:\Users\Kiwi>python --version
在 cmd 中运行它会导致Python 3.7.4
这是我想在cmd中运行的脚本,脚本的位置是
C:\Users\Kiwi\JUPYTER_FILES\test_script.ipynb
import numpy as np
array = np.arange(0,10)
print(array)
print('hello');
我正在尝试从 cmd 运行该 python 脚本,但是当我运行它时它没有给出任何输出。
C:\Users\Kiwi>python C:\Users\Kiwi\JUPYTER_FILES\test_script.ipynb
C:\Users\Kiwi> //it just went blank like this after above command
我不知道怎么了。在我做了很多阅读和其他问题之后,没有任何效果。我已经正确设置了环境变量,我可以执行那个 python 版本命令,我已经用它的完整路径运行了 python 脚本,但是它仍然没有返回任何东西,而脚本非常简单并且从字面上打印了 2 件事。有没有什么办法解决这一问题?
解决方案
推荐阅读
- python - Plotly Python 中的刻度格式
- python - 如何使用 Python 从 ZIP 文件中查找字符串
- javascript - 模仿 TypeScript 中的扩展方法
- css - 为什么我的 CSS Grid 不能在 IE 11 中正确呈现?
- node.js - 在 docker 中运行 ng build 时如何为 node.js 分配更多内存?
- python - 在 Python 中,根据该数组的特定列中的值将数组行分成组
- sql-server - 如何根据其他行插入行?
- excel - Excel - 条件格式:如果上面的单元格不同,请更改填充颜色
- arrays - 如何在不使用 for 循环的情况下将列表项复制到数组
- c# - 我可以从 Xamarin 应用程序创建公共/永久文件吗?