I want to set anaconda to default and launch jupyter notebook

Asked 2 years ago, Updated 2 years ago, 125 views

This is my first time to ask a question.I apologize for my lack of knowledge.
After installing pyenv and anaconda,

$pienv rehash
$ pyenv global anaconda3-4.3.1

However, I would like to set anaconda3-4.3.1 to the default.

$pyenv versions
  system
* anaconda3-4.3.1 (set by / Users / myname / .pyenv / version )

should have been configured with

$which python
/usr/bin/python

will be

$python --version
Python 2.7.10

$ python
Python 2.7.10 (default, Feb 6 2017, 23:53:20) 
GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34) on darwin
Type "help", "copyright", "credits" or "license" for more information.

$ jupyter notebook
-bash:jupyter:command not found

I would like to launch the jupyter notebook from the command.What should I do?

$/Users/myname/.pyenv/versions/anaconda3-4.3.1/bin/jupyter_mac.command

If you type, the jupyter notebook will start.

I only want to start with the jupyter notebook.I look forward to your kind cooperation.

python macos anaconda pyenv

2022-09-29 22:39

2 Answers

You may not have eval "$(pyenv init-)".

For example, if you are using Bash, look at through /.bashrc to see if the following lines are included, and then reload the shell (these settings should normally be in the instructions for installing pyenv):

export PATH="~/.pyenv/bin:$PATH"
event "$(pyenv init-)"
event "$(pyenv virtualenv-init-)"

Without this setting, the $PATH is not recognized and the Python environment on the system side is selected.


2022-09-29 22:39

Is there a file called .python-version in the home directory, for example? There seems to be a case where pynenv global doesn't work well because it takes precedence.

http://qiita.com/1234224576/items/11ad3509fe4b0a9a33ed


2022-09-29 22:39

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.