I've found on SO only that related post but looks it does not apply here.
I'm following guide on Python optimization Profiling and Optimizing Jupyter Notebooks - A Comprehensive Guide in Julyter
notebook.
And tried as written install line_profiler
. First just as was written in the guide !pip install line_profiler
. I got error error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
. So I've installed C++ redistributable
downloaded from that link and restarted Windows 10 but the error persisted.
Then I've found by web search and to follow advice from here Installing Python Packages from a Jupyter Notebook but both advised ways failed, one with same error about C++.
import sys
!{sys.executable} -m pip install line_profiler
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
import sys
!conda install --yes --prefix {sys.prefix} line_profiler
EnvironmentNotWritableError: The current user does not have write permissions to the target environment. environment location: C:\ProgramData\Anaconda3
I've tried conda
as I've installed Julyter by Anaconda
package install. In the article I've mentioned it is advised against using sudo
so I have not tried to somehow use install with admin privileges.
What could be the problem and what else can I do to fix/investigate the issue?
ADDED:
I can install "simple" test packages, like !pip install simplejson
resulted in Successfully installed simplejson-3.16.0
.
Following advice in answer by orangeInk I installed Desktop development with C++
advised in https://stackoverflow.com/questions/48541801/microsoft-visual-c-14-0-is-required-get-it-with-microsoft-visual-c-build-t
- now variant with pip
resulted in several hours of kernel busyness, then I closed that notebook as I thought it should not take that long.