简体   繁体   中英

X13ARIMA & statsmodels: X13NotFoundError: x12a and x13as not found on path

I am on Window OS. I downloaded the Windows version of X13 software from https://www.census.gov/data/software/x13as.X-13ARIMA-SEATS.html#list-tab-635278563 .

I would like to use it with my Python code as below.
But I get error:
X13NotFoundError: x12a and x13as not found on path. Give the path, put them on PATH, or set the X12PATH or X13PATH environmental variable.

import pandas as pd
from pandas import Timestamp

s = pd.Series(
    {Timestamp('2013-03-01 00:00:00'): 838.2,
 Timestamp('2013-04-01 00:00:00'): 865.17,
 Timestamp('2013-05-01 00:00:00'): 763.0})
     
     
import os
os.chdir(r'C:\Users\user-name\Downloads\x13as_ascii-v1-1-b59\x13as')

import statsmodels.api as sm
sm.tsa.x13_arima_analysis(s)

I finally solved the problem by
1)changing to x13as_ascii.exe to x13as.exe
2)import os
os.chdir(r'C:\Users\user-name\Downloads\x13as_ascii-v1-1-b59\x13as')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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