Skip to content

Commit 42b43b1

Browse files
author
Dean Wampler
committed
More troubleshooting tips
1 parent 8d573de commit 42b43b1

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

reference/Troubleshooting-Tips-Tricks.ipynb

+35
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,41 @@
115115
"They are related to the graphing libraries we use and appear to be harmless."
116116
]
117117
},
118+
{
119+
"cell_type": "markdown",
120+
"metadata": {},
121+
"source": [
122+
"### \"ImportError: No module named gym\"\n",
123+
"\n",
124+
"If you are working on a laptop and using Anaconda, and you get import errors for modules like `gym`, e.g., _ImportError: No module named gym_, this probably indicates you have the wrong `python` and `pip` commands on your path ahead of the versions for your Conda environment. To verify, use the `which` command:\n",
125+
"\n",
126+
"```shell\n",
127+
"$ which -a python\n",
128+
"/usr/bin/python\n",
129+
"/Users/me/anaconda3/envs/anyscale-academy/bin/python\n",
130+
"```\n",
131+
"\n",
132+
"In this example, the built-in `python` is ahead of the correct Conda environment `python`.\n",
133+
"\n",
134+
"To fix, try the following:\n",
135+
"\n",
136+
"First, try activiting the `anyscale-academy` environment again: \n",
137+
"\n",
138+
"```shell\n",
139+
"conda activate anyscale-academy\n",
140+
"```\n",
141+
"\n",
142+
"(see the [README](../README.md) for more details about the Conda environment we are using).\n",
143+
"\n",
144+
"Run `which -a python` again. Does it show your `~/anaconda3/envs/anyscale-academy/bin/python` first? If not, force the correct ordering by changing the path: \n",
145+
"\n",
146+
"```shell\n",
147+
"export PATH=$HOME/anaconda3/envs/anyscale-academy/bin:$PATH\n",
148+
"```\n",
149+
"\n",
150+
"Run the `which` command again to confirm the correct `python` is now first in the list."
151+
]
152+
},
118153
{
119154
"cell_type": "markdown",
120155
"metadata": {},

0 commit comments

Comments
 (0)