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

Instructions to run on Python 3.8.5 / Windows 10 Ubuntu WSL #32

Closed
thatramenpanda opened this issue Feb 25, 2021 · 11 comments
Closed

Instructions to run on Python 3.8.5 / Windows 10 Ubuntu WSL #32

thatramenpanda opened this issue Feb 25, 2021 · 11 comments

Comments

@thatramenpanda
Copy link

thatramenpanda commented Feb 25, 2021

Probably not the best place but maybe helps somebody so I'm dumping here:

  1. Enable Windows subsystem for Linux - open PowerShell as Administrator and run the following thee commands:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
  1. Install Ubuntu 20.04 LTS from Microsoft Store

  2. Run it, let it do its thing, set username and password and you should end up in a terminal window

  3. Run the following commands to install a few dependencies and check out Gamestonk Terminal from GitHub:

sudo apt update && sudo apt upgrade -y 
sudo apt install python3-venv python3-dev g++ pkg-config libfreetype6-dev -y
git clone https://github.com/DidierRLopes/GamestonkTerminal.git
cd GamestonkTerminal
  1. Edit requirements.txt file and delete the appscript line
nano requirements.txt
  1. Next, run the following commands to create a Python virtual environment and install Gamestonk:
python3 -m venv venv_for_GamestonkTerminal
source ./venv_for_GamestonkTerminal/bin/activate
export INSTALL_ON_LINUX=1
pip3 install wheel
pip3 install numpy==1.19.2
pip3 install -r requirements.txt
  1. Run Gamestonk Terminal
python3 gamestonk_terminal.py

Note: To get plotly/graphs to work you will also need to install Nvidia beta CUDA drivers for WSL on latest Windows Insider build, which requires joining MS Insider program. Hopefully they will be out of beta soon.

You need to activate Python venv again if you close your Ubuntu terminal to run Gamestonk:

cd GamestonkTerminal
source ./venv_for_GamestonkTerminal/bin/activate
python3 gamestonk_terminal.py
@sigaloid
Copy link
Contributor

Do the graphs open successfully? And is there a benefit to this instead of just regular windows python? That's what the developer uses

@dbriemann
Copy link

I tried this on Ubuntu 20.04 itself (not WSL) and it fails with this issue #19 :

RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
  File "gamestonk_terminal.py", line 6, in <module>
    from helper_funcs import *
  File "/home/dlb/apps/GamestonkTerminal/helper_funcs.py", line 9, in <module>
    import matplotlib
  File "/home/dlb/apps/GamestonkTerminal/env/lib/python3.8/site-packages/matplotlib/__init__.py", line 205, in <module>
    _check_versions()
  File "/home/dlb/apps/GamestonkTerminal/env/lib/python3.8/site-packages/matplotlib/__init__.py", line 190, in _check_versions
    from . import ft2font
ImportError: numpy.core.multiarray failed to import

Any tip on fixing this? I don't really have much Python experience.

@thatramenpanda
Copy link
Author

@dbriemann installing numpy 1.19.2 manually before applying requirements.txt solved it for me. Are you using python 3.8.5 and running commands in step 6 in the same order?

@thatramenpanda
Copy link
Author

Do the graphs open successfully? And is there a benefit to this instead of just regular windows python? That's what the developer uses

@sigaloid I didn't get that far, haven't tried installing beta CUDA drivers

@sigaloid
Copy link
Contributor

Ah okay, was just confused since I wasn't sure if the GUI features would work through WSL.

@dbriemann
Copy link

@dbriemann installing numpy 1.19.2 manually before applying requirements.txt solved it for me. Are you using python 3.8.5 and running commands in step 6 in the same order?

I just repeated every step from zero and still have the same bug.. no idea if there is some strange problem with installed python packages or what is going on. I seem to always have problems with python projects and pip.. must be me.

@dbriemann
Copy link

Ok I ran this another time and this time added --no-cache-dir to every pip install command. This time it ERROR: Failed building wheel for fbprophet.

However I now can at least start the program. No idea if that error about fbprophet is serious.

@DidierRLopes
Copy link
Collaborator

Hey guys,

I'm working on improving the whole requirements text file, so this should all be fixed soon.

fbprophet is the hard one, as its dependencies are a pain. Hopefully I'll overcome the beast :)

@shadycuz
Copy link
Contributor

shadycuz commented Mar 4, 2021

@sigaloid windows isn't really supported because its not supported by pystan officially.

@shadycuz
Copy link
Contributor

shadycuz commented Mar 4, 2021

You don't have to have the nvidia drivers or be apart of the MS insiders to see charts using WSL. Just google "mobaxterm WSL".

@shadycuz
Copy link
Contributor

shadycuz commented Mar 4, 2021

I'm going to close this now. Lots has changed since this was opened. You can run git checkout main, git pull main to fetch the latest and attempt to reinstall.

The project has been testest to work with Pythons 3.6.8, 3.7 and 3.8. Tensorflow doesn't support python 3.9 yet.

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
jmaslek pushed a commit that referenced this issue Apr 26, 2021
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

5 participants