when running Pytest test through ssh I get “no module named pandas” although module is installed

最后都变了- 提交于 2019-12-13 20:27:01

问题


when running Pytest test through ssh I get "no module named pandas" although module is installed both on vritual environment and locally.

Can somebody point out where else should I install it?

I access my server:

ssh user@server.com

enter password

run the following command: "py.test -s -v jupyter_test.py". It runs tests, and as test result I get above mentioned error.

When I do test on server, without ssh, it works perfectly. But I need to do it through ssh.


回答1:


the reason was that on remote machine there was installed old version of Python, when I converted script to Python 3 it worked just fine.

command I used to convert script is:

jupyter nbconvert --to script --execute --stdout file.ipynb | python3


来源:https://stackoverflow.com/questions/50466372/when-running-pytest-test-through-ssh-i-get-no-module-named-pandas-although-mod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!