pydata / patsy

Describing statistical models in Python using symbolic formulas
Other
956 stars 104 forks source link

Using two patsy versions in the same environment #159

Closed yanivbm88 closed 4 years ago

yanivbm88 commented 4 years ago

Hello,

I came across the need to use two patsy versions in the same environment (0.4.1 & 0.5.1). That happens because I'm trying to integrate a new product to an older environment that already uses patsy 0.4.1, and patsy 0.5.1 is a requirements for my new product.

What is the recommended way of handling this? Is there a proper way to setup patsy under an alternative name?

Thanks, Yaniv

bashtage commented 4 years ago

You will need to do the same thing you did with statsmodels only tp patsy. Then you will need to edit the copy of statsmodels you changes (e.g, statsmodels8) to import the modified version of patsy you created. As I said in statsmodels/statsmodels#6912, this is incredibly nonstandard. You might find it easier to write an external interface using subprocess than to play the whack-a-mole of tying to have 2 versions of a package in the same Python install.