2017-02-12 64 views
0

我有蟒蛇的Python = 2.7,我嘗試安裝蟒蛇Python 3.x都有 但它說我只需要更新使用暢達更新蟒蛇= 3.6無法更新蟒蛇和Python 3.6

和我做到這一點:

$conda update anaconda 

但總是結果:

PackageNotFoundError: Package not found: 'anaconda' Package 'anaconda' is not installed in /Users/MacBook/miniconda3

我成功地從網站蟒蟒安裝3.6,但是當我檢查有:

$python --version 

結果是Python 2.7.12,當我嘗試:

$conda install python=3.6 

或:

conda create -n py36 python=3.6 ipykernel 

結果是:

CondaHTTPError: HTTP 404 None 
for url <None> 
The remote server could not find the channel you requested. 
You will need to adjust your conda configuration to proceed. 
Use `conda config --show` to view your configuration's current state. 
Further configuration help can be found at <http://conda.pydata.org/docs/config.html> 

的原因,我這樣做是因爲我想在Jupyter筆記本中有一個python版本的選項。

但是當我做

$ which -a python python=3.6 
/Users/MacBook/miniconda3/bin/python 
/Users/MacBook/miniconda2/bin/python 
/Users/MacBook/anaconda/bin/python 
/Library/Frameworks/Python.framework/Versions/2.7/bin/python 
/usr/local/bin/python 
/usr/bin/python 

我做同樣的我的Mac mini,並能正常工作。

我弄亂了我的python文件夾嗎?

+0

檢查是通過編寫'conda list'來安裝conda –

回答

0

I have Anaconda Python=2.7, and I try to install Anaconda Python 3.x but it says I just need to update the using conda update python=3.6

and I do this:

$conda update anaconda but the result always:

PackageNotFoundError: Package not found: 'anaconda' Package 'anaconda' is not installed in /Users/MacBook/miniconda3

在我看來,你的Anaconda(因此Conda)沒有正確安裝。您應該能夠下載Anaconda軟件包並單擊進行安裝。之後,我會通過運行conda listconda search來測試conda是否正常工作。

I successfully installed python 3.6 from python website, but when I check with:

$python --version The result is Python 2.7.12 and when I try:

原因很可能是因爲python 3.6不在您的PATH中。嘗試echo $PYTHONPATHecho $PATH

$conda install python=3.6 or:

如果您只想使用python 3.6,那麼您可以如何安裝它。

conda create -n py36 python=3.6 ipykernel the result is:

如果你想同時擁有Python 2和3

,你這是怎麼會安裝python3。 我會做conda create -n py36 python=3.6 anaconda ipython

CondaHTTPError: HTTP 404 None for url The remote server could not find the channel you requested. You will need to adjust your conda configuration to proceed. Use conda config --show to view your configuration's current state.

你可以粘貼你執行conda config --show後看到了什麼?

你看到類似

changeps1: True 
channel_alias: https://conda.anaconda.org 
channel_priority: True 
channels: 
defaults 
client_ssl_cert: None 
client_ssl_cert_key: None 
clobber: False 
create_default_packages: [] 
custom_channels: 
pkgs/r: https://repo.continuum.io/ 
Users/admin/anaconda/conda-bld: file:/// 
pkgs/pro: https://repo.continuum.io/ 
pkgs/free: https://repo.continuum.io/ 
custom_multichannels: 
local: ["file:///Users/admin/anaconda/conda-bld"] 
defaults: ["https://repo.continuum.io/pkgs/free", 
"https://repo.continuum.io/pkgs/r", "https://repo.continuum.io/pkgs/pro"] 
default_channels: 
https://repo.continuum.io/pkgs/free 
https://repo.continuum.io/pkgs/r 
https://repo.continuum.io/pkgs/pro 

but when I do

$ which -a python python=3.6 /Users/MacBook/miniconda3/bin/python /Users/MacBook/miniconda2/bin/python /Users/MacBook/anaconda/bin/python /Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/local/bin/python /usr/bin/python

看看你PATHPYTHONPATH