Issue
I'm using MacOS and I recently installed anaconda, but it gives ipython - command not found when I want to check the version of ipython. It's not "a wrapper/launcher issue" which someone else in stackflow has asked about, since I could not find ipython in my directory. I've pasted the following commands in the terminal below. I hope that helps.
lawn-128-61-127-169:bin s$ pwd
/Library/Frameworks/Python.framework/Versions/3.7/bin
lawn-128-61-127-169:bin s$ ls
2to3 f2py3.7 pydoc3 python3.7m
2to3-3.7 flake8 pydoc3.7 python3.7m-config
autopep8 idle3 pyflakes pyvenv
chardetect idle3.7 python3 pyvenv-3.7
easy_install-3.7 pip3 python3-config
f2py pip3.7 python3.7
f2py3 pycodestyle python3.7-config
lawn-128-61-127-169:bin s$ conda install ipython
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
lawn-128-61-127-169:bin s$ conda -V
conda 4.8.1
lawn-128-61-127-169:bin s$ python3.7 -V
Python 3.7.4
lawn-128-61-127-169:bin s$ ipython -V
-bash: ipython: command not found
lawn-128-61-127-169:bin s$ which ipython
lawn-128-61-127-169:bin s$ python3.7 -m IPython
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7: No module named IPython
Solution
You need to create and activate a conda environment before you can use conda to install and use software. The conda documentation provides a step-by-step, but basically, the following shell commands are required:
# create environment
conda create --name myenv
# create an environment and install the ipython package into it
conda create --name myenv ipython
then activate the environment:
conda activate myenv
(By default, conda stores all environments in its own envs
directory, but provides options for specifying custom directories for storing the environment.)
If you're not sure what environments you've already created, use conda info
:
conda info --envs
Answered By - charlesreid1
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.