Skip to content

Commit c949b36

Browse files
committed
Update installation methods/messages now that IPython 7.0 is out
1 parent 933a7b0 commit c949b36

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

src/convenience.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,15 @@ NOT_INSTALLABLE = (false, "", Nothing)
8383

8484
function condajl_installation(package)
8585
if PyCall.conda && package in conda_packages
86+
args = `install -y -c conda-forge $package`
8687
message = """
8788
Installing $package via Conda.jl
8889
Execute?:
89-
Conda.add($package)
90+
Conda.runconda($args)
9091
"""
91-
install = () -> Conda.add(package)
92+
install = () -> Conda.runconda(args)
93+
# `Conda.add_channel` overwrites user's ~/.condarc so let's
94+
# not use it.
9295
return (true, message, install)
9396
end
9497
return NOT_INSTALLABLE
@@ -98,7 +101,7 @@ function conda_installation(package)
98101
conda = joinpath(dirname(PyCall.pyprogramname), "conda")
99102
if isfile(conda) && package in conda_packages
100103
prefix = dirname(dirname(PyCall.pyprogramname))
101-
command = `$conda install --prefix $prefix $package`
104+
command = `$conda install --prefix $prefix -c conda-forge $package`
102105
message = """
103106
Installing $package with $conda
104107
Execute?:
@@ -115,11 +118,11 @@ function pip_installation(package)
115118
"mock", "ipython-dev", "ipython-pre", "julia")
116119
args = package
117120
if package == "ipython-dev"
118-
args = `--upgrade "git+git://github.com/ipython/ipython#egg=ipython"`
121+
args = `"git+git://github.com/ipython/ipython#egg=ipython"`
119122
elseif package == "ipython-pre"
120-
args = `--upgrade --pre ipython`
123+
args = `--pre ipython`
121124
end
122-
command = `$(PyCall.pyprogramname) -m pip install $args`
125+
command = `$(PyCall.pyprogramname) -m pip install --upgrade $args`
123126
message = """
124127
Installing $package for $(PyCall.pyprogramname)
125128
Execute?:

src/ipython_jl/convenience.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,13 @@ def wrapped(*args, **kwargs):
8383
8484
You are using IPython version {IPython.__version__} which is known to
8585
cause segmentation fault with tab completion. For segfault-free
86-
IPython, upgrade to version 7 or above (which may still be in
87-
development stage depending on the time you read this message).
86+
IPython, upgrade to version 7 or above.
8887
Note also that IPython releases after 5.x do not support Python 2.
8988
90-
If you need to install development version of IPython and understand
91-
what would happen to your Python environment by doing so, executing
92-
the following command in Julia may help:
89+
If you want to upgrade IPython, executing the following command in
90+
Julia may help:
9391
92+
IPython.install_dependency("ipython") # or
9493
IPython.install_dependency("ipython-pre") # or
9594
IPython.install_dependency("ipython-dev")
9695

0 commit comments

Comments
 (0)