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

Segmentation fault: 11 (OSX) when trying to run 'view' or 'pred' #4

Closed
avocardio opened this issue Feb 25, 2021 · 17 comments
Closed

Segmentation fault: 11 (OSX) when trying to run 'view' or 'pred' #4

avocardio opened this issue Feb 25, 2021 · 17 comments

Comments

@avocardio
Copy link

Pretty new to this; when trying to run view or pred, like using knn, a little file pops up but then closes after a few seconds and gives me this error.

Screen Shot 2021-02-24 at 9 49 28 PM

@noahkuhn
Copy link

Seeing this as well, macOS 11.2.1, using Python 3.8.7 via a pyenv virtualenv.

@DidierRLopes
Copy link
Collaborator

This is odd I didn't have such issue.

Can you try to load a dataframe partially? I.e. set a starting date?

You can do so with:
load -t GME -s 2020-06-04

And then attempt view, or pred funcs.

It may be due to the size of the dataframe we're getting from Alpha Vintage. But I'd find it odd that you are seeing this issue and I'm not. I'm using Python 3.8.6 on a macOS 10.13.6

@noahkuhn
Copy link

I just ran that and it just does the segfault. I think this is a macOS 11 issue. Hopefully it can be sorted out, I'd love to have a crack at this thing!

> view [1] 74984 segmentation fault python gamestonk_terminal.py

@noahkuhn
Copy link

I got this to work by scrapping pyenv virtual environments and just using virtualenv directly. Took a ton of manual pip installs to get all dependencies, but I think I'm in the clear. Not sure if the person that posted this issue was using pyenv & virtualenv.

@DidierRLopes
Copy link
Collaborator

Nice!

@avocardio can you try instead of using pyenv & virtualenv, to use only virtualenv directly?

Yes, the pip install dependencies have been a bit of a nightmare :/

@nitsujri
Copy link

@noahkuhn I ran into the same problem but am a python amateur.

Specifically, how do you not use pyenv and use virtualenv directly?

I thought I was doing that by

  • rm .python-version
  • pip install -r requirements.txt

Now my prompt looks like GamestonkTerminal git:(main) instead of (gamestonk) GamestonkTerminal git:(main), so I thought that was using it without pyenv, but honestly I'm not sure where pip install is going when I don't have the (gamestonk) prefix.

But I still get a segfault trying to run View.

@michalchmura
Copy link

Same issue here

@noahkuhn
Copy link

noahkuhn commented Feb 25, 2021

Fellow novice here too, so this might not be the best method, but try this. Pretty sure this is what worked for me. Granted I'm still getting some other errors doing various things:

  • pyenv deactivate
  • pyenv virtualenv-delete gamestonk
  • pip install virtualenv
  • virtualenv venv
  • source venv/bin/activate
  • pip install -r requirements.txt
  • python gamestonk_terminal.py

You will likely get an error and be missing a bunch of dependencies so just note the module name at the bottom of the error and keep running

pip install xxxxxxx

and then retrying

python gamestonk_terminal.py

until it works... Basically what is happening is that your virtual environment files get put in the root of your project directory instead of under .pyenv/blah/blah/blah. I bet there are reasons to put that folder outside the root (version control, central location) but I'll figure that out another day.

My guess is that @DidierRLopes is going to tighten the hell out of this thing, hopefully with all this feedback it will get much more reliable.

@emilepetrone
Copy link

What version of fbprophet are you running?

@noahkuhn
Copy link

If you're asking me: 0.7.1

@avocardio
Copy link
Author

Nice!

@avocardio can you try instead of using pyenv & virtualenv, to use only virtualenv directly?

Yes, the pip install dependencies have been a bit of a nightmare :/

How exactly do I use virtualenv directly? I have been trying by reinstalling like @noahkuhn did but sadly has not worked for me.

@noahkuhn
Copy link

noahkuhn commented Feb 26, 2021

Hmm, that should work. Basically you need to get out of whatever pyenv virtualenv you are in, then make sure you have virtualenv installed to begin with, go into your project folder, create a new virtualenv using the virtualenv command (NOT pyenv virtualenv) and then activate it. At that point you can use pyenv to set the Python version.

Again, I'm just learning python so this might all be bad practice, but it's what worked for me.

Also, I would make sure you are using Python 3.6.8, which is what @DidierRLopes used to build this. My biggest hurdle was getting 3.6.8 installed on macOS 11.2.1. There are some bugs lurking in pyenv that make it impossible to install without patching the installation files.

The command at this link re: 3.6.8 is what eventually worked for me: https://gist.github.com/aputs/1e898436c70c23ea739899a7942a720a

@d0tkom
Copy link

d0tkom commented Feb 26, 2021

I was getting segfault as well when running view on Big Sur, but updating matplotlib from 3.1.1 to 3.3.3 fixed it.

@DidierRLopes
Copy link
Collaborator

Hey guys,

Sorry for all the issues with the requirements. I didn't expect so many people to be interested in this project, hence why didn't have a more robust "installation" process.

I'm working on these during weekend:

  • Using poetry to manage packages
  • Reduce requirements to whatever is strictly necessary
  • Making sure I can run a docker image from this

Bear with me since I'm new to these topics, but this should allow for the code to be much more smooth in installation process.

@nitsujri
Copy link

nitsujri commented Mar 4, 2021

Came back to report that switching to pyenv + poetry it all works great!

Thanks so much @DidierRLopes + team. For me personally, this issue is closed.

@michalchmura
Copy link

For myself, upgrading matplotlib 3.1.1 → 3.3.3 fixed it

@shadycuz
Copy link
Contributor

shadycuz commented Mar 4, 2021

I'm going to close this now. Lots has changed since this was opened.

The project has been testest to work with Pythons 3.6.8, 3.7 and 3.8.

We are using poetry to manage the project and that is one option for installing. The other is to install with the requirements.txt. Feel free to use any virtual environment you want.

Just make sure to run pip install --upgrade pip as that was affecting some people as tensorflow requires pip >= 2.19 (or something like that).

We also have a dockerfile if you would prefer to use docker. We will also soon be offering an "official image" on dockerhub.

Oh and Windows is only supported with docker because pystan is not available for windows (officially).

If you are having problems please open a new issue =).

🚀 GamestonkTerminal 🌔

@shadycuz shadycuz closed this as completed Mar 4, 2021
DidierRLopes pushed a commit that referenced this issue Apr 19, 2021
piiq pushed a commit that referenced this issue Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants