Is it possible to start the bpython interpreter so that it always runs some custom commands when it launches?
In my case I simply want to do:
import numpy as np
import matplotlib.pyplot as plt
I can't see anything in the docs. Anyone know a way?
Python import numpy is not working that means eithers the module is not installed or the module is corrupted. To fix the corrupted module, uninstall it first then reinstall it.
Go to Python -> site-packages folder. There you should be able to find numpy and the numpy distribution info folder. If any of the above is true then you installed numpy successfully.
It is written in the docs, just not clearly labelled as such at: http://docs.bpython-interpreter.org/django.html
Gist of it is you can have an environment variable called PYTHONSTARTUP
. bpython will execute this file before you get dropped in the interpreter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With