installation troubleshooting
Installing a complex scientific computing environment or a diverse set of laptops is very challenging. Even though our instructions work for most students, there are many ways in which something can not quite work the way as expected.
This page collects notes and recipes on trouble shooting (or "debugging" as we say) the installation process.
For additional help see also SoftwareCarpentry's Configuration Problems and Solutions.
You opened git-bash and try to run the command
pip install vpython
or
python --version
but you get an error such as bash: pip: command not found.
We are adding additional information to your bash shell startup file so that Anaconda will be found.
This solution assumes that you installed Anaconda3 in the default location — if you changed the location in the installation process then you will have to change the content of the MYCONDA
variable below to use your custom location.
-
open git-bash
-
type
cd echo $HOME
(always hit RETURN after typing a command)
You should see output such as
/c/Users/YOUR-USERNAME
(where "YOUR-USERNAME" stands for your user name, e.g., "alice", "bob", or "dvader") -
type exactly
cat >> $HOME/.bash_profile << 'EOF' # PHY494 bash startup for local Anaconda # see https://github.com/ASU-CompMethodsPhysics-PHY494/PHY494-resources/wiki/installation-troubleshooting MYCONDA="$HOME/Anaconda3" export PATH="$MYCONDA:$MYCONDA/Scripts:$MYCONDA/Library/bin:$PATH" unset MYCONDA EOF
-
close git-bash
-
open a new git-bash (this is important so that the changes take effect)
-
type
which conda
Should print something like
/c/Users/YOUR-USERNAME/Anaconda3/Scripts/conda
.
Then try out again to run pip
or python
.
Newer versions of Anaconda do not add themselves to the Windows PATH anymore. The installer for Anaconda3 now recommends users by default to NOT add anaconda path to Windows PATH environment variable and thus our installation instructions for windows lead to an installation with Anaconda3 not immediately accessible from the command line.
It should be possible to launch the atom
editor from bash in git-bash like
atom new.py
Instead it gives an error that atom
cannot be found.
The Atom menu bar has a command named "Install Shell Commands" which installs the atom
and apm
commands, as described
under Opening a File
Run the command and provide your system administrator password if requested.
You need to add the directory where the atom
command resides to your PATH
environment variable so that bash can find it.
First you need to find the location of atom:
-
Right click on your atom icon where you usually open the atom editor and click Properties
-
Copy Start in directory; it looks like this
start in: C:\Users\YOURNAME\AppData\Local\atom\app-X.Y.Z
where YOURNAME is your username and X.Y.Z is the installed version.
-
Transform into a UNIX path:
- backslashes to forward slashes:
\
to/
-
C:
becomes/c
It should look similar to
/c/Users/YOURNAME/AppData/Local/atom/app-X.Y.Z
(still using YOUR file path!)
- backslashes to forward slashes:
Then add it to your bash start up file:
-
open git-bash
-
Execute the command below but make sure that the line starting with
MYATOMDIR
contains your transformed path!cat >> $HOME/.bash_profile << 'EOF' # PHY494 add atom to PATH for git-bash # see https://github.com/ASU-CompMethodsPhysics-PHY494/PHY494-resources/wiki/installation-troubleshooting MYATOMDIR="/c/Users/YOURNAME/AppData/Local/atom/app-X.Y.Z" export PATH="$PATH:$MYATOMDIR" unset MYATOMDIR EOF
-
close your git-bash terminal
-
open a new git-bash terminal
-
try to run
atom new.py
It should open an empty file in
atom
.
- Inside
atom
, navigate to the directory and then Open Terminal Here (Open the Terminal (Mac OS X, Linux) or Git-Bash terminal (Windows) in the given directory via context menu or keyboard shortcut.)
The box in VPython is not visible, only a blank square. (Note: initially you look at the box side on so it looks like a gray square on black background.)
Try opening the notebook in the Chrome web browser instead of Explorer/Edge: Just type http://localhost:8888
in Chrome's URL bar.
It is possible that the startup files for the bash shell got corrupted. Try finding any of the following files in your home directory (typically C:\Users\USERNAME
) and rename them (which inactivates them). Not all files might be present:
- .bashrc --> X.bashrc
- .bash_profile --> X.bash_profile
- .profile --> X.profile
Then try re-opening git-bash.
If it works you can then look at your X. files to see if there was anything in there that might have been responsible for the problems or show them to your instructor.
On macOS, if you get the error OSError: [Errno 49] Can't assign requested address you might need to use
jupyter notebook --ip=127.0.0.1
The following problems can occur independent of the operating system
Wrong conda
is used. Check
which conda
in the terminal: it should show a path in your home directory. E.g., for user "physics":
- Windows:
/c/Users/Physics/Anaconda3/conda
- macOS:
/Users/physics/Anaconda3/conda
- Linux:
/home/physics/Anaconda3/conda
Try exiting the terminal and open a new terminal (or git bash) and try again. Changes to PATH only take effect when a new shell is opened.