首页 > 解决方案 > 从 Python 访问 WRDS:无连接

问题描述

我想通过 Python 访问 WRDS。我正在使用 Pycharm。

根据此链接:https ://wrds-www.wharton.upenn.edu/pages/support/programming-wrds/programming-python/python-from-your-computer/

我已经在我的虚拟环境中安装了 WRDS。

我已将代码编写为:

import wrds
db = wrds.Connection(wrds_username='Seanusername')
db.create_pgpass_file()

当代码运行时,它会询问我的用户名,但没有任何反应。它不会进一步询问我的密码,也没有错误。

云有人建议我做错了什么?还是使用 Pycharm 有问题?!

非常感谢

标签: pythondataframepycharmwrdswrds-compusat

解决方案


I finally found out that this works if I run the program in the Python Console.

That's weird because I contacted some people, for some of this this worked fine and for the others they also needed to run in the console.


推荐阅读