when running Pytest test through ssh I get “no mod

2019-09-02 18:32发布

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条回答
干净又极端
2楼-- · 2019-09-02 19:01

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
查看更多
登录 后发表回答