久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

在 Cygwin 中為 Anaconda 永久設置 Python 路徑

Permanently set Python path for Anaconda within Cygwin(在 Cygwin 中為 Anaconda 永久設置 Python 路徑)
本文介紹了在 Cygwin 中為 Anaconda 永久設置 Python 路徑的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試在我的 Windows 7 機器上安裝 Anaconda.我經常使用 cygwin 來進行命令行工作,我想從那里管理 Anaconda.我已經完成了圖形安裝程序,沒有任何問題,并選中了必要的框以將我的默認路徑重置為此 python 安裝.我繼續檢查 python 在哪里,最初我得到了這個......

I'm trying to install Anaconda on my Windows 7 machine. I often use cygwin to for my command-line work, and I would like to manage Anaconda from there. I've worked through the graphic installer without any issues, and checked necessary boxes to reset my default path to this install of python. I go ahead to check where python is and initially I get this...

$ which python
/usr/bin/python

從這里 python 工作正常...

From here python works fine...

$ python
Python 2.7.5 (default, Oct  2 2013, 22:34:09)
[GCC 4.8.1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.

但我正在嘗試從 anaconda 工作,所以我只需要重新定義我的路徑...

But I'm trying to work from anaconda, so I should just need to redefine my path...

$ export PATH=/cygdrive/c/anaconda:$PATH
$ which python
/cygdrive/c/anaconda/python

現在我應該很好了,但是當我嘗試進入 python 時,它只是掛起

And now I should be good to go, but when I try and step into python, it just hangs

$ python

知道為什么會發生這種情況嗎?詳細返回,下面...

Any idea why this might be happening? verbose return, below...

$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# C:anacondalibsite.pyc matches C:anacondalibsite.py
import site # precompiled from C:anacondalibsite.pyc
# C:anacondalibos.pyc matches C:anacondalibos.py
import os # precompiled from C:anacondalibos.pyc
import errno # builtin
import nt # builtin
# C:anacondalib
tpath.pyc matches C:anacondalib
tpath.py
import ntpath # precompiled from C:anacondalib
tpath.pyc
# C:anacondalibstat.pyc matches C:anacondalibstat.py
import stat # precompiled from C:anacondalibstat.pyc
# C:anacondalibgenericpath.pyc matches C:anacondalibgenericpath.py
import genericpath # precompiled from C:anacondalibgenericpath.pyc
# C:anacondalibwarnings.pyc matches C:anacondalibwarnings.py
import warnings # precompiled from C:anacondalibwarnings.pyc
# C:anacondaliblinecache.pyc matches C:anacondaliblinecache.py
import linecache # precompiled from C:anacondaliblinecache.pyc
# C:anacondalib	ypes.pyc matches C:anacondalib	ypes.py
import types # precompiled from C:anacondalib	ypes.pyc
# C:anacondalibUserDict.pyc matches C:anacondalibUserDict.py
import UserDict # precompiled from C:anacondalibUserDict.pyc
# C:anacondalib\_abcoll.pyc matches C:anacondalib\_abcoll.py
import _abcoll # precompiled from C:anacondalib\_abcoll.pyc
# C:anacondalibabc.pyc matches C:anacondalibabc.py
import abc # precompiled from C:anacondalibabc.pyc
# C:anacondalib\_weakrefset.pyc matches C:anacondalib\_weakrefset.py
import _weakrefset # precompiled from C:anacondalib\_weakrefset.pyc
import _weakref # builtin
# C:anacondalibcopy_reg.pyc matches C:anacondalibcopy_reg.py
import copy_reg # precompiled from C:anacondalibcopy_reg.pyc
# C:anacondalib	raceback.pyc matches C:anacondalib	raceback.py
import traceback # precompiled from C:anacondalib	raceback.pyc
# C:anacondalibsysconfig.pyc matches C:anacondalibsysconfig.py
import sysconfig # precompiled from C:anacondalibsysconfig.pyc
# C:anacondalib
e.pyc matches C:anacondalib
e.py
import re # precompiled from C:anacondalib
e.pyc
# C:anacondalibsre_compile.pyc matches C:anacondalibsre_compile.py
import sre_compile # precompiled from C:anacondalibsre_compile.pyc
import _sre # builtin
# C:anacondalibsre_parse.pyc matches C:anacondalibsre_parse.py
import sre_parse # precompiled from C:anacondalibsre_parse.pyc
# C:anacondalibsre_constants.pyc matches C:anacondalibsre_constants.py
import sre_constants # precompiled from C:anacondalibsre_constants.pyc
# C:anacondaliblocale.pyc matches C:anacondaliblocale.py
import locale # precompiled from C:anacondaliblocale.pyc
import encodings # directory C:anacondalibencodings
# C:anacondalibencodings\__init__.pyc matches C:anacondalibencodings\__init__.py
import encodings # precompiled from C:anacondalibencodings\__init__.pyc
# C:anacondalibcodecs.pyc matches C:anacondalibcodecs.py
import codecs # precompiled from C:anacondalibcodecs.pyc
import _codecs # builtin
# C:anacondalibencodingsaliases.pyc matches C:anacondalibencodingsaliases.py
import encodings.aliases # precompiled from C:anacondalibencodingsaliases.pyc
import operator # builtin
# C:anacondalibfunctools.pyc matches C:anacondalibfunctools.py
import functools # precompiled from C:anacondalibfunctools.pyc
import _functools # builtin
import _locale # builtin
# C:anacondalibencodingscp1252.pyc matches C:anacondalibencodingscp1252.py
import encodings.cp1252 # precompiled from C:anacondalibencodingscp1252.pyc
# zipimport: found 13 names in C:anacondalibsite-packages
unipy-0.1.0-py2.7.egg
# zipimport: found 144 names in C:anacondalibsite-packagessetuptools-3.6-py2.7.egg
Python 2.7.7 |Anaconda 2.0.1 (64-bit)| (default, Jun 11 2014, 10:40:02) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and htt

我遇到的另一個(可能相關的)問題是每次關閉/打開 cygwin 時都需要重置路徑.我在 .bashrc 和 .profile 中輸入了以下文本,以嘗試永久設置路徑:

Another (possibly related) issue I'm having is needing to reset the path every time I close/open cygwin. I've entered the following text into .bashrc and .profile to try and set the path permanently:

# Set path to python from anaconda install
export PATH=/cygdrive/c/anaconda:$PATH

打開和關閉cygwin后,返回:

After opening and closing cygwin, I return to:

$ which python
/usr/bin/python

這可能與設置某些系統環境變量有關嗎?

Could this be related to setting certain system environment variables?

推薦答案

為了在 Cygwin 中使用交互式 Python shell,我使用了 -i 選項.

To work with the interactive Python shell in Cygwin I use the -i option.

為了從 Anaconda 安裝中獲取它,我使用了上面建議的步驟:

To get it from the Anaconda install, I used the steps suggested above:

$ export PATH=/cygdrive/c/anaconda:$PATH
$ which python
/cygdrive/c/anaconda/python

然后我在 Cygwin 中使用 -i 選項啟動 python:

Then I launch python within Cygwin with the -i option:

$ python -i
Python 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Jul  2 2014, 15:12:11) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>>>

這些庫也運行良好.例如,現在可以導入 pandas 庫(已通過 Anaconda 安裝).

The libraries are also working fine. For instance the pandas library (which has been installed through Anaconda) can be imported now.

>>>> import pandas
>>>> pandas.DataFrame
<class 'pandas.core.frame.DataFrame'>

現在為了永久保存,我在我的 bashrc 文件中添加了路徑:

Now to make this permanent I added the path in my bashrc file:

$ echo 'export PATH=/cygdrive/c/anaconda:$PATH' >> .bashrc
$ source .bashrc
$ which python
/cygdrive/c/anaconda/python

我希望這會有所幫助.

這篇關于在 Cygwin 中為 Anaconda 永久設置 Python 路徑的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to install Selenium in a conda environment?(如何在 conda 環境中安裝 Selenium?)
get the CUDA and CUDNN version on windows with Anaconda installe(使用 Anaconda installe 在 Windows 上獲取 CUDA 和 CUDNN 版本)
How can I download Anaconda for python 3.6(如何下載適用于 python 3.6 的 Anaconda)
Using two different Python Distributions(使用兩個不同的 Python 發行版)
How can I install Anaconda aside an existing pyenv installation on OSX?(除了 OSX 上現有的 pyenv 安裝之外,如何安裝 Anaconda?)
Pipenv with Conda?(Pipenv 與 Conda?)
主站蜘蛛池模板: 欧美jizzhd精品欧美巨大免费 | 久久久久久国产精品 | 在线一区二区三区 | 久久综合伊人 | 少妇一区二区三区 | jizz视频| 日韩av手机在线观看 | 国产一区二区电影 | 精品国产乱码久久久久久中文 | 中文字幕精品一区二区三区在线 | 欧美一级片在线观看 | 国产一级片网站 | 欧美成人a∨高清免费观看 老司机午夜性大片 | www.精品一区 | 亚洲精品久久久蜜桃 | 亚洲欧洲在线观看视频 | 中文字幕在线观看成人 | 亚洲免费视频播放 | 亚洲码欧美码一区二区三区 | 国产片淫级awww | 久久午夜影院 | 国产精品一区二区三区四区 | 精品一区二区三区在线观看国产 | 久久国产精品久久久久久久久久 | 在线91 | 欧美一区免费 | 国产免费福利小视频 | 国产成人精品一区二区在线 | 精品亚洲二区 | 免费一级欧美在线观看视频 | 中文字幕乱码一区二区三区 | 亚洲免费在线播放 | 国产精品久久久久久网站 | 黄色大片网 | 97国产精品视频人人做人人爱 | 亚洲欧美在线视频 | 91视频大全 | 日韩中文字幕免费 | 男女羞羞视频在线免费观看 | 久久久精品天堂 | 在线观看国产三级 |