如何在 Sublime Text 3 上安装 Pandas
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49585471/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install pandas on Sublime Text 3
提问by user3236992
I'm fairly new to Python - I am using 2.7 and SublimeText3.
I can't seem to install Pandas. I was able to install andaconda, but when I run
我对 Python 还很陌生——我使用的是 2.7 和 SublimeText3。
我似乎无法安装 Pandas。我能够安装 andaconda,但是当我运行时
import pandas as pd
It shows
表明
ImportError: No module named pandas
What should I be doing in order to get this to work properly? (Does Pandas simply not work with SublimeText3?)
我应该怎么做才能让它正常工作?(Pandas根本不适用于 SublimeText3 吗?)
回答by Rehan Azher
For Windows (Hopefully you have Pip), open cmd and run:
对于 Windows(希望你有 Pip),打开 cmd 并运行:
pip install pandas
For Linux , use same command on terminal
对于 Linux ,在终端上使用相同的命令
Then try above gain.
然后尝试以上增益。
回答by Pierre Capo
I think you are confusing text editors and shells.
我认为您混淆了文本编辑器和 shell。
Sublime Text is a text editor which allows you to write code in whatever program language you want, you should see it as a paper sheet. You can really write whatever you want in a paper sheet.
Sublime Text 是一个文本编辑器,它允许你用你想要的任何程序语言编写代码,你应该把它看作一张纸。你真的可以在一张纸上写下你想要的任何东西。
Shells on the other hand are the program which are able to understand and execute the code you have written in a text editor. You can have a python a shell (a shell which executes python codes) in programs like Idle or Jupyter, and in your command prompt after typing python3
assuming you have installed python with a version >= 3
另一方面,Shell 是能够理解和执行您在文本编辑器中编写的代码的程序。您可以在 Idle 或 Jupyter 等程序中使用 python shell(执行 python 代码的 shell),并在输入后的命令提示符中python3
假设您已安装版本 >= 3 的 python