using Pkg
Pkg.add("PyCall")
Pkg.build("PyCall")
Solution 1: Manually install matplotlib
If you want to prevent Atom from reinstalling matplotlib using conda frequently, you can manually install matplotlib in your Julia environment. Here’s how:
using Pkg
Pkg.add("PyCall")
Pkg.build("PyCall")
using PyCall
conda"install matplotlib"
This will install matplotlib using conda and prevent Atom from reinstalling it frequently.
Solution 2: Specify the version of matplotlib
If you are experiencing frequent reinstallation of matplotlib, you can try specifying the version of matplotlib to use. Here’s how:
using Pkg
Pkg.add("PyCall")
Pkg.build("PyCall")
using PyCall
pyimport_conda("matplotlib", version="2.2.3")
This will install matplotlib version 2.2.3 using conda and prevent Atom from reinstalling it frequently.
Solution 3: Disable automatic package installation in Atom
If you don’t want Atom to automatically install packages, including matplotlib, you can disable this feature. Here’s how:
- Open Atom.
- Go to Settings (Preferences on macOS).
- Select Packages from the left sidebar.
- Search for the package named “Hydrogen” and click on Settings.
- Scroll down to the “Auto Install Packages” section.
- Disable the “Enable Auto Install Packages” option.
By disabling automatic package installation in Atom, you can prevent it from reinstalling matplotlib frequently.
Among the three options, the best solution depends on your specific needs and preferences. If you want to have control over the installation process, Solution 1 or Solution 2 would be suitable. On the other hand, if you prefer to disable automatic package installation in Atom altogether, Solution 3 would be the better choice.