Launch Octave with GUI - qt

I downloaded octave version 4.2.1 as instructed here http://wiki.octave.org/Octave_for_macOS, and I am able to run Octave from the terminal. However, I cannot launch Octave using GUI. When I add the command --force-gui, nothing happens.
I have tried brew reinstall octave --with-qt --with-fltk --with-gui
, which does not help.
Any ideas?
Thank you

I had the same problem.
Tried qt, flk but nothing happens with homebrew.
I do this:
Remove octave from homebrew : brew uninstall octave
Installed MacPort (https://guide.macports.org)
Install octave by macport : sudo port install octave

The repository homebrew/science is dead. Now Octave is available on dpo/homebrew-openblas
Just type:
brew tap dpo/openblas
Next pin the repository:
brew tap-pin dpo/openblas
Then install the dev snapshot with Java and the GUI
brew install dpo/openblas/octave --HEAD --with-qt --devel --with-java

You may also install Octave via MacPorts by executing
sudo port install octave
in the terminal. By default MacPorts will install Octave with the following options: +accelerate +app +docs +gfortran +graphicsmagick +qt5 +sound +sundials. It is qt5, that is necessary for the GUI backend. To view available options prior the installation you may execute:
port variants octave
To install Octave with the options you like list the options at the end of the command:
sudo port install octave +atlas +gcc10
Finally, to view the options with which Octave was installed, execute:
port installed | grep octave
And to launch Octave with GUI run:
octave --gui &

Related

How to install PyTorch natively on Apple M1 with Miniforge?

I'd like to run PyTorch natively on my M1 MacBook Air. I followed these instructions which say to start with
brew install miniforge
brew info miniforge confirms that I installed the osx-arm64 version, so that's fine. Then I did
conda create --name pytorch_env python=3.8
This should download and install a few packages, but when they are listed before installation I see that they are all osx-64, not osx-arm64. The same happens for the actual PyTorch installation:
conda install -c pytorch pytorch
Only osx-64 packages get installed. I completed the process and ran a sample script which confirmed that I only have the Intel version running.
I then installed universal Python 3.9.6 and tried to create an environment with Python 3.9, but this did not make a difference.
I also have an Anaconda3 installation on this machine, which is probably x86-only (the installer is).
What can I do now?
It was the leftover from my Anaconda3 installation, indeed.
I had to delete the conda initialize part in my .zshrc file. Then I reran the instructions starting from conda init zsh, and it worked.

Atom hydrogen on windows 10: No kernels installed

I am using Atom on windows 10 and I have the issue that hydrogen isn't running or updating any kernels while stating the error message:
Atom hydrogen Error: No kernels Installed
I have python 3.8.4 installed as well as ipython 7.16.1
I can run python scripts from atom, code highlighting ect.. works just fine. Jupyter Notebook is installed and works too when run from the command shell.
Ipython is working too in the command shell. Any suggestions what could be missing?
So this one resolved the issue for me:
-Make sure pip and jupyter are updated to the newest release.
-go to your windows command prompt (press WIN+R, then type cmd and press ENTER)
then try entering the following:
python -m ipkernel install --user
pip install --upgrade ipkernel
Then go into Atom and select Packages -> Hydrogen -> Update Kernels

jupyter not found after pip install jupyter

After many different ways of trying to install jupyter, it does not seem to install correctly.
May be MacOS related based on how many MacOS system python issues I've been having recently
pip install jupyter --user
Seems to install correctly
But then jupyter is not found
where jupyter
jupyter not found
Not found
Trying another install method found on SO
pip install --upgrade notebook
Seems to install correctly
jupyter is still not found
where pip /usr/local/bin/pip
What can I do to get the command line jupyter notebook command working as in the first step here: https://jupyter.readthedocs.io/en/latest/running.html#running
Short answer: Use python -m notebook
After updating to OS Catalina, I installed a brewed python: brew install python.
It symlinks the Python3, but not the python command, so I added to my $PATH variable the following:
/usr/local/opt/python/libexec/bin
to make the brew python the default python command (don't use system python, and now python2.7 is deprecated). python -m pip install jupyter works, and I can find the jupyter files in ~/Library/Python/3.7/bin/, but the tutorial command of jupyter notebook doesn't work. Instead I just run python -m notebook.
My MacOS has python 2.7, I installed python3 with brew, then the following commands work for me
brew install python3
brew link --overwrite python
pip3 install ipython
python3 -m pip install jupyter
You need to add the local python install directory to your path. Apparently this is not done by default on MacOS.
Try:
export PATH="$HOME/Library/Python/<version number>/bin:$PATH"
and/or add it to your ~/.bashrc.
Try solving this with Conda or Poetry.
Poetry makes it a lot easier to manage Python dependencies (including Jupyter) and build a virtual environment.
Here are the steps to adding Jupyter to a project:
Run poetry add pandas jupyter ipykernel to add the dependency
Run poetry shell to create a shell within the virtual environment
Run jupyter notebook to to fire up a notebook with access to all the virtual environment dependencies
The other suggested solutions are just band-aids. Conda / Poetry can give you a sustainable solution that's easy to maintain and will shield you from constant Python dependency hell.

How to install wordcloud in python3.6?

I installed wordcloud via conda in Windows 64
conda install -c conda-forge word cloud
but that is python 3.4.
I want to install word cloud in python 3.6
but i did search the google.
but it is not effect. so please teach me....
Anaconda Python 3.6 version
For Windows
==== Installation of wordcloud package ====
download wordcloud‑1.3.2‑cp36‑cp36m‑win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
Copy the file to your current working directory
Open command prompt from Tools
python -m pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
It should work now
For MAC
pip install wordcloud
There is a solution, you can download a third party package for Python 3. Following the below steps helped me solve the problem.
Wordcloud_successful_install
Download wordcloud‑1.3.2‑cp36‑cp36m‑win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
Copy the file to your current working directory
Open command prompt from Tools
Python -m pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
This will work:
1. create virEnv: conda create -n yourenvname python=3.5 anaconda
2. source activate yourenvname
3. conda install -c conda-forge wordcloud
Install wordcloud from the following page:
https://pypi.org/project/wordcloud/
Note: command: pip install wordcloud
Note: run the above command in Anaconda cmd prompt
Pre-requisities for instaling wordcloud is to install Visual C++(I got this error to install. So, you may give a try).This requires almost 4GB space. Once installed, restart your machine and then try the 1st step. It should be successful this time.
Ok. I solved my issue using wheels. Here are the steps:
Download the .whl file compatible with your Python version and your windows distribution (32bit or 64bit) from here https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
cd to the file path
Run this command python -m pip install

Brew: uninstalling all version of a package

I am trying to uninstall qt.
I did brew uninstall qt, and it uninstalled the version 5.9.0, but it says that:
4.8.7_2, 5.8.0_1 2 are still installed
I want to delete them as well.
Is there a way to uninstall with brew all the versions of a package?
Thanks in advance!
OS: Mac El Capitan
brew uninstall --force qt
worked
brew uninstall qt#4.8.7_2 qt#5.8.0_1
Both of these will probably warn that there are still dependencies, for example on my machine:
$ brew uninstall qt
Error: Refusing to uninstall /usr/local/Cellar/qt/5.14.0
because it is required by gnuplot, octave, poppler and pyqt, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies qt
You don't use --force, but add these reverse dependencies to the list. For my example above:
brew uninstall qt#5.14.0 gnuplot octave poppler pyqt
You can then check with brew list if there are any other remnants you want to remove.

Resources