Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'pandas.stats' / no tools.py #44

Open
gitcnd opened this issue May 27, 2021 · 1 comment
Open

ModuleNotFoundError: No module named 'pandas.stats' / no tools.py #44

gitcnd opened this issue May 27, 2021 · 1 comment

Comments

@gitcnd
Copy link

gitcnd commented May 27, 2021

a) Update: looks like you need to update your instructions to tell us to install anaconda3 ?
b) Looks like you need to explain to people that "universal" (your module) is NOT the same thing as "universal" (Shubham Chaudhary's compile tool from 2014)...

Suggestion - fix your doc to say this for "install":

1. install anaconda3
2. pip uninstall universal
3. pip install universal-portfolios

I followed these instructions: https://github.com/Marigold/universal-portfolios - in a fresh install (everything new today on CentOS 8) of jupyter lab, and the example notebook fails to run as follows:-

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-5760efab9188> in <module>
     11 
     12 import universal as up
---> 13 from universal import tools, algos
     14 from universal.algos import *
     15 

~/.local/lib/python3.6/site-packages/universal/tools.py in <module>
      3 import scipy.optimize as optimize
      4 from scipy.special import betaln
----> 5 from pandas.stats.moments import rolling_mean as rolling_m
      6 from pandas.stats.moments import rolling_corr
      7 import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'pandas.stats'

This guy had the same problem: #20 - but it was closed with no explanation?

@Marigold
Copy link
Owner

Marigold commented Jun 1, 2021

Hey Chris, sorry for the late response.

to tell us to install anaconda3 ?

Good idea, I'll emphasize that only python 3 is supported in the newest version.

As for the error with from pandas.stats.moments import rolling_mean as rolling_m, if you check source code you'll see that the line from stackstrace has been removed a few months ago. It looks like you're using an old version for some reason. Maybe using Python 2 would install an old version? In any case, make sure you use python 3 and try reinstalling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants