简体   繁体   English

如何在 pycharm 中安装 pandas

[英]How to install pandas in pycharm

I am trying to install the pandas package in pycharm.我正在尝试在 pycharm 中安装pandas package。 I get the following error: unable to find vcvarsall.bat (i tried to install via the cmd but also via the project interpreter ).我收到以下错误: unable to find vcvarsall.bat (我尝试通过cmd安装,但也通过project interpreter安装)。 I tried to install WSDK according to here but it did not work.我尝试根据here 安装WSDK,但没有成功。 I also tried the instructions in the video .我还尝试了视频中的说明。 Lastly i tried downloading the gcc binary according.最后我尝试根据下载gcc 二进制文件。

None of these worked.这些都不起作用。 Any ideas?有任何想法吗? I am using Windows 10, my python version is 3.4.1 and the pip version is 1.5.6 (for 64-bit)我正在使用 Windows 10,我的 python 版本是 3.4.1,pip 版本是 1.5.6(适用于 64 位)

尝试python -m pip install --upgrade pip然后是pip install pandas ,或者python -m pip install pandas

If you are on latest PyCharm 2018 then follow the below steps to install:如果您使用的是最新的 PyCharm 2018,请按照以下步骤进行安装:

MAC:马克:

Click on PyCharm shown on the Menu bar -> Click Preferences -> Click Project Interpreter under your Project -> Click ' + ' -> search for 'pandas'/'numpy' (you can specify specific version you want to install) and Click install underneath.单击菜单栏上显示的PyCharm -> 单击Preferences -> 单击项目下的Project Interpreter -> 单击 ' + ' ->搜索'pandas'/'numpy'(您可以指定要安装的特定版本)并单击安装在下面。 Now you're done.现在你完成了。

Open terminal from View -> Tool Windows -> Terminal type command:从视图 -> 工具窗口 -> 终端类型命令打开终端:

pip install pandas

Upon successful installation you should see output like so:成功安装后,您应该会看到如下输出:

Successfully installed numpy-1.14.3 pandas-0.23.0 python-dateutil-2.7.3 pytz-2018.4 six-1.11.0

Then from File → Settings → Project: YourProjectName → Project Interpreter check that under project interpreter pandas package installed.然后从 File → Settings → Project: YourProjectName → Project Interpreter 检查项目解释器下的 pandas 包是否安装。

Easiest way to do this is install anaconda on your machine.最简单的方法是在你的机器上安装 anaconda。 Then fire up your pycharm >> go to new project >> then you are given with 2 option - one is to select folder and the second one is to select interpreter .然后启动你的 pycharm >> 转到新项目 >> 然后你有两个选项 - 一个是选择文件夹,第二个是选择解释器。

Select interpreter as the directory where you have installed anaconda then go to settings, there you find something available packages then search for the package you wish you install and press install package and you are good to go.选择 interpreter 作为安装 anaconda 的目录,然后转到设置,在那里找到一些可用的软件包,然后搜索您希望安装的软件包,然后按install package就可以了。

This is the list you will get , just click on the one you want to install and hit install package at the bottom of dialog box.这是您将获得的列表,只需单击要安装的列表并点击对话框底部的安装包

enter image description here在此处输入图片说明

Just write your program, use pandas library.只需编写您的程序,使用熊猫库。 import pandas -> under pandas you will see red lines. import pandas -> 在 pandas 下你会看到红线。 Hover your mouse there you will see install option just click it and wait for few minutes.将鼠标悬停在那里,您将看到安装选项,只需单击它并等待几分钟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM