Closed jrinne314 closed 1 year ago
BTW, Pip list does bring up pyportfolioopt as well as cvxopt and cvxpy. >>> import pyportfolioopt
Traceback (most recent call last):
File "
cvxopt 1.3.1 cvxpy 1.3.1 ecos 2.0.11 idna 3.4 numpy 1.24.3 osqp 0.6.3 packaging 23.1 pandas 2.0.2 pip 23.1.2 platformdirs 3.5.1 pooch 1.7.0 pyportfolioopt 1.5.5
Thank you. I use this program's output every day for my portfolio and it has worked on my new computes. So far can import other modules including: >>> import cvxopt
import cvxpy
Thank you for any help. I have a math degree but I am old and I am self-taught with Python. But usually I—with ChatGPT-can make things works.
Jim
Hi @jrinne314, you successfully installed the library, but you are using it incorrectly. You should import the pypfopt
, not pyportfolioopt
Please take a look at our example here: https://github.com/robertmartin8/PyPortfolioOpt#a-quick-example
I saw that you opened 2 issues for Macos and Windows, if that solve your problem please close both of them, if not please let me know.
Wow!!! Meaning thank you for such a simple and effective answer. BTW if interested, my code worked before because of redundancies, I think. Import pyportfolioopt as pypfopt not good but later 'from pypfopt import plotting' may have made the program run. ChatGPT thought it was case-sensitive issue: PyPortfolioOpt. TL;DR: Much appreciated!
The 'from pypfopt import plotting import' is redundant but helpful in your case because it solves the pyportfolioopt
name conflict. The ChatGPT check is not always accurate because it is not case-sensitive. However, the name of this library is a bit confusing. I spent some time thinking about it, but I couldn't come up with a better name. I know that some people will be confused by the name, like you, but it's an easy issue to fix. We can help you guys if you have any problems.
P.S. I'm glad to hear that you're using the library every day. We are too.
Operating system, environment, python version Macbook Pro M2 pro chip with new (repeated) install of Anaconda for Apple Silicone What you tried pip install pyportfolioopt
Error message