[英]quandl issue with Pycharm
I have installed quandl via pip through Anaconda Prompt and everything seems good. 我已经通过Anaconda Prompt的pip安装了quandl ,一切似乎都很好。 But then, I can't use quandl on my PyCharm. 但是后来,我不能在我的PyCharm上使用quandl。
I have Python 3. 我有Python 3。
I have tried several solutions, but none seem to work. 我尝试了几种解决方案,但似乎都没有用。
However, quandl works fine in Spyder. 但是,quandl在Spyder中可以正常工作。
Any suggestion to make it work in PyCharm? 有什么建议使其可以在PyCharm中使用吗?
It's very weird because even if I just type import quandl
in PyCharm and run it, then I get the quandl has no get attribute
error! 这很奇怪,因为即使我只是在PyCharm中输入import quandl
并运行它,然后得到的quandl has no get attribute
错误!
Make sure Pycharm
is using the Python interpreter
you installed quandl
on. 确保Pycharm
使用安装了quandl
的Python interpreter
。
In Pycharm
the Interpreter Settings
are found under 在Pycharm
, Interpreter Settings
位于
>File, >Settings, >Project:, >Project Interpreter
If import quandl
works on python3 (terminal) or in Spider and not in Pycharm, is probably a configuration problem. 如果import quandl
在python3(终端)或Spider上而不在Pycharm上有效,则可能是配置问题。
You should set the correct Python Interpreter in Pycharm settings. 您应该在Pycharm设置中设置正确的Python解释器。
Follow this path in pyCharm: 在pyCharm中遵循以下路径:
File -> Settings -> Project -> Project Interpreter
Then, select which one that contains quandl . 然后,选择包含quandl的那个 。
Anyway, I suggest you a different approach: i think that the best solution is set an anaconda environment for each project. 无论如何,我建议您采用另一种方法:我认为最好的解决方案是为每个项目设置anaconda环境。 In this way you can set the project interpreter with the anaconda environment and all will work well. 这样,您可以在anaconda环境中设置项目解释器,并且一切都将正常运行。
To create an environment use the following command: 要创建环境,请使用以下命令:
conda create -n <name> python=x.x anaconda
then activate it with 然后用
activate <name> (Windows)
source activate <name> (Linux)
install new packages in this way: 以这种方式安装新软件包:
conda install -n <name> <package>
At the end deactivate environment: 最后停用环境:
source deactivate
I link this tutorial on anaconda environments. 我在anaconda环境上链接了本教程 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.