![](/img/trans.png)
[英]pycurl installation issue on windows using pip and easy_install
[英]Pandas Installation Using Pip and Easy_install
我的熊貓有問題。 首先,我嘗試在CD C:\\ Python27 \\ Scrips ...上輕松安裝。 easy_install.exe numpy
和easy_install.exe pandas
但是只有numpy起作用,pandas沒有起作用,所以我使用pip進行安裝。 並且對兩者都起作用。 但是回到我的代碼,當我測試它時,
這是我的代碼:
import fileinput
import csv
import numpy
import pandas
#records = pe.iget_records(file_name="test.xlxs")
records = pd.read_csv('test.csv', header=None, nrows=5)
#To Write ni
cho = raw_input("\nStart Forecaster on file?:<1/0>")
if cho == 1:
for record in records:
rem = df.iloc([i], [0])
print(rem)
sold1 = df.iloc([i], [1])
print(sold1)
sold2 = df.iloc([i], [2])
print(sold2)
rem = int(rem)
sold1 = int(sold1)
sold2 = int(sold2)
result = forecast(rem,sold1,sold2)
print(result)
df.set_value([i], [4], result)
pd.to_csv('test.csv')
print "Forecast Complete! Please check the file!"
else:
quit()
但是我得到這個錯誤:
Traceback (most recent call last):
File "tester.py", line 4, in <module>
import pandas
File "C:\Python27\lib\site-packages\pandas\__init__.py", line 25, in <module>
from pandas import hashtable, tslib, lib
File "pandas\src\numpy.pxd", line 157, in init pandas.hashtable (pandas\hashtable.c:40866)
ValueError: numpy.dtype has the wrong size, try recompiling. Expected 52, got 56
您將需要刪除所有以前安裝的pandas
和numpy
安裝,因為它們已經安裝了太多次,從而使庫感到困惑。 刪除它們之后,使用pip
重新安裝pandas
和numpy
,如下所示:
pip install numpy
pip install pandas
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.