Skip to content

Commit

Permalink
Fixed issue with sklearn => scikit-learn
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed Apr 26, 2023
1 parent 0feca35 commit 32fe666
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 20 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ You can also run some of the notebooks interactively with Binder too

# Coding log

* 26 Apr 2023
*

* 04 Apr 2022
* Added French election example
* 24 Mar 2022
Expand Down
Binary file modified pythoncourse/coursecode/xlwings/plot_xl/plot_xl.xlsm
Binary file not shown.
2 changes: 1 addition & 1 deletion pythoncourse/installation/create_conda_env_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pip install arctic==1.79.4 \
cufflinks==0.17.3 plotly kaleido wordcloud \
dash dash-html-components dash-core-components \
dash-table jupyter-dash chart_studio Pillow==7.2.0 \
finmarketpy chartpy findatapy financepy==0.193 pandas==1.2.3
finmarketpy chartpy findatapy financepy==0.220 pandas==1.2.3

# plotly==4.14.3
# Hack for vaex!
Expand Down
2 changes: 1 addition & 1 deletion pythoncourse/installation/create_conda_env_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pip install arctic==1.79.4 \
cufflinks==0.17.3 plotly kaleido wordcloud \
dash dash-html-components dash-core-components \
dash-table jupyter-dash chart_studio \
finmarketpy chartpy findatapy financepy==0.193 pandas==1.2.3 numpy==1.19.5
finmarketpy chartpy findatapy financepy==0.220 pandas==1.2.3 numpy==1.19.5

# Hack for vaex!
pip uninstall progressbar2
Expand Down
2 changes: 1 addition & 1 deletion pythoncourse/installation/create_conda_env_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ call pip install arctic==1.79.4 ^
cufflinks==0.17.3 plotly kaleido wordcloud ^
dash dash-html-components dash-core-components ^
dash-table jupyter-dash chart_studio Pillow==7.2.0 ^
finmarketpy chartpy findatapy financepy==0.193 pandas==1.2.3
finmarketpy chartpy findatapy financepy==0.220 pandas==1.2.3

REM plotly==4.14.3
REM Hack for vaex!
Expand Down
6 changes: 3 additions & 3 deletions pythoncourse/installation/environment_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,9 @@ dependencies:
- datetime==4.4
- enum-compat==0.0.3
- fake-useragent==0.1.11
- financepy==0.193
- financepy==0.220
- findatapy==0.1.26
- finmarketpy==0.11.11
- finmarketpy==0.11.12
- fxcmpy==1.2.10
- imutils==0.5.4
- jupyter-dash==0.4.1
Expand All @@ -708,7 +708,7 @@ dependencies:
- retrying==1.3.3
- rise==5.7.1
- seasonal==0.3.1
- sklearn==0.0
- scikit-learn==1.0.2
- twython==3.9.1
- tzdata==2022.1
- tzlocal==4.1
Expand Down
6 changes: 3 additions & 3 deletions pythoncourse/installation/environment_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,10 @@ dependencies:
- fake-useragent==0.1.11
- feedfinder2==0.0.4
- feedparser==6.0.2
- financepy==0.193
- financepy==0.220
- findatapy==0.1.25
- findspark==1.4.2
- finmarketpy==0.11.10
- finmarketpy==0.11.12
- flask-compress==1.9.0
- flask-ngrok==0.0.25
- freetype-py==2.2.0
Expand Down Expand Up @@ -652,7 +652,7 @@ dependencies:
- seasonal==0.3.1
- sentencepiece==0.1.95
- sgmllib3k==1.0.0
- sklearn==0.0
- scikit-learn==1.0.2
- smart-open==3.0.0
- smmap==4.0.0
- socketio-client==0.7.2
Expand Down
6 changes: 3 additions & 3 deletions pythoncourse/installation/environment_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ dependencies:
- datetime==4.4
- enum-compat==0.0.3
- fake-useragent==0.1.11
- financepy==0.193
- financepy==0.220
- findatapy==0.1.26
- finmarketpy==0.11.11
- finmarketpy==0.11.12
- fxcmpy==1.2.10
- imutils==0.5.4
- jupyter-dash==0.4.1
Expand All @@ -658,7 +658,7 @@ dependencies:
- retrying==1.3.3
- rise==5.7.1
- seasonal==0.3.1
- sklearn==0.0
- scikit-learn==1.0.2
- twython==3.9.1
- tzdata==2022.1
- tzlocal==4.1
Expand Down
23 changes: 20 additions & 3 deletions pythoncourse/installation/installing_anaconda_and_pycharm.html
Original file line number Diff line number Diff line change
Expand Up @@ -14250,12 +14250,29 @@ <h2 id="Windows/Linux/Mac:-Installing-a-conda-environment-if-all-else-fails">Win
</div>
<div class="jp-Cell-inputWrapper"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h2 id="Problems-with-Jupyter-notebook">Problems with Jupyter notebook<a class="anchor-link" href="#Problems-with-Jupyter-notebook">&#182;</a></h2><p>When running a Jupyter notebook if you get a kernal error displaed and in the command line it shows an error like <code>Kernal Error - FileNotFoundError: [WinError 2] The system cannot find the file specified</code>, you might need to install the <code>ipykernel</code> from the command line. To do this in the Anaconda Prompt type in the following:</p>
<h2 id="Problems-with-getting-correct-Python-to-run-in-Jupyter-notebook">Problems with getting correct Python to run in Jupyter notebook<a class="anchor-link" href="#Problems-with-getting-correct-Python-to-run-in-Jupyter-notebook">&#182;</a></h2><p>When running a Jupyter notebook if you get a kernal error displaed and in the command line it shows an error like <code>Kernal Error - FileNotFoundError: [WinError 2] The system cannot find the file specified</code>. Basically, this means that Jupyter can't find the correct Python under your conda environment (eg. <code>py38class</code>).</p>
<p>One fix is to search for <code>kernel.json</code> under your Anaconda folder, and check it has the correct path for the Python under your conda environment. Eg. for <code>py38class</code> we would likely find it in <code>&lt;&lt;Whatever your Anaconda Folder Is&gt;&gt;/py38class/share/jupyter/kernels/python3/kernel.json</code> and below is a sample file.</p>
<p><code>{
"argv": [
"c:/Anaconda3/envs/py38class\\python.exe",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3 (ipykernel)",
"language": "python",
"metadata": {
"debugger": true
}
}</code></p>
<p>Once, you've made these changes you'll need to restart Jupyter.</p>
<p>Alternatively, you might need to install the <code>ipykernel</code> from the command line. To do this in the Anaconda Prompt type in the following:</p>
<ul>
<li><code>conda activate py38class</code></li>
<li><code>python -m ipykernel install --user</code></li>
<li><code>python -m ipykernel install --user --name=py38class</code></li>
</ul>
<p>More details can be found on <a href="https://github.com/jupyter/notebook/issues/4079">https://github.com/jupyter/notebook/issues/4079</a></p>
<p>More details can be found on <a href="https://github.com/jupyter/notebook/issues/4079">https://github.com/jupyter/notebook/issues/4079</a> and <a href="https://towardsdatascience.com/get-your-conda-environment-to-show-in-jupyter-notebooks-the-easy-way-17010b76e874">https://towardsdatascience.com/get-your-conda-environment-to-show-in-jupyter-notebooks-the-easy-way-17010b76e874</a></p>

</div>
</div>
Expand Down
31 changes: 26 additions & 5 deletions pythoncourse/installation/installing_anaconda_and_pycharm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,35 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Problems with Jupyter notebook\n",
"## Problems with getting correct Python to run in Jupyter notebook\n",
"\n",
"When running a Jupyter notebook if you get a kernal error displaed and in the command line it shows an error like `Kernal Error - FileNotFoundError: [WinError 2] The system cannot find the file specified`, you might need to install the `ipykernel` from the command line. To do this in the Anaconda Prompt type in the following:\n",
"When running a Jupyter notebook if you get a kernal error displaed and in the command line it shows an error like `Kernal Error - FileNotFoundError: [WinError 2] The system cannot find the file specified`. Basically, this means that Jupyter can't find the correct Python under your conda environment (eg. `py38class`).\n",
"\n",
"One fix is to search for `kernel.json` under your Anaconda folder, and check it has the correct path for the Python under your conda environment. Eg. for `py38class` we would likely find it in `<<Whatever your Anaconda Folder Is>>/py38class/share/jupyter/kernels/python3/kernel.json` and below is a sample file.\n",
"\n",
"`{\n",
" \"argv\": [\n",
" \"c:/Anaconda3/envs/py38class\\\\python.exe\",\n",
" \"-m\",\n",
" \"ipykernel_launcher\",\n",
" \"-f\",\n",
" \"{connection_file}\"\n",
" ],\n",
" \"display_name\": \"Python 3 (ipykernel)\",\n",
" \"language\": \"python\",\n",
" \"metadata\": {\n",
" \"debugger\": true\n",
" }\n",
"}`\n",
"\n",
"Once, you've made these changes you'll need to restart Jupyter.\n",
"\n",
"Alternatively, you might need to install the `ipykernel` from the command line. To do this in the Anaconda Prompt type in the following:\n",
"\n",
"* `conda activate py38class`\n",
"* `python -m ipykernel install --user`\n",
"* `python -m ipykernel install --user --name=py38class`\n",
"\n",
"More details can be found on https://github.com/jupyter/notebook/issues/4079"
"More details can be found on https://github.com/jupyter/notebook/issues/4079 and https://towardsdatascience.com/get-your-conda-environment-to-show-in-jupyter-notebooks-the-easy-way-17010b76e874"
]
},
{
Expand Down Expand Up @@ -543,4 +564,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

0 comments on commit 32fe666

Please sign in to comment.