2016-07-04 61 views
3

我首先會說我是一名Linux和Mac傢伙,出於工作原因,我一直「被迫」在Windows,Windows 7上更具體地工作。這實際上是我第一次使用Windows。Cygwin + Anaconda在Windows 7上無法正常工作

我首先安裝了Anaconda(我認爲它是最簡單的方法,因爲我缺乏Windows的經驗),然後Cygwin只運行setup-x86_64.exe文件的默認值。

我可以在指揮官(cmd.exe)開始Python和IPython的,因此,例如

C:\Users\username> ipython 
Python 3.5.1 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)] 
Type "copyright", "credits" or "license" for more information. 

IPython 4.1.2 -- An enhanced Interactive Python. 
?   -> Introduction and overview of IPython's features. 
%quickref -> Quick reference. 
help  -> Python's own help system. 
object? -> Details about 'object', use 'object??' for extra details. 

In [1]: import os 
In [2]: import sys 
In [3]: os.path.dirname(sys.executable) 
Out[4]: 'C:\\Anaconda3' 

但這不會在Cygwin的工作。它看起來像Cygwin的找到正確的安裝

[email protected]/
$ which python 
/cygdrive/c/Anaconda3/python 

[email protected]/
$ which ipython 
/cygdrive/c/Anaconda3/Scripts/ipython 

但是,當我開始蟒蛇它完全凍結和IPython的(?):

$ ipython 
In [1]: 

沒有初始化消息,並自動完成,向上箭頭和其他通常的ipython功能將不起作用。

無論如何,任何建議如何與Cygwin設置anaconda?我非常肯定所有人都要編輯PATH或者用setup-x86_64.exe文件安裝,但Windown和我似乎沒有很好地交流(到目前爲止)。

謝謝

+0

可能是https://github.com/mintty/mintty/issues/56。 – matzeri

+0

感謝您的回答。好吧,cygwin中的python也是如此,否則它將無法工作......太棒了......¬¬ – Javier

回答

1

您是否嘗試過使用-i標誌運行它?它不爲我工作,否則:

$ ipython 
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] 
Type "copyright", "credits" or "license" for more information. 

IPython 5.1.0 -- An enhanced Interactive Python. 
?   -> Introduction and overview of IPython's features. 
%quickref -> Quick reference. 
help  -> Python's own help system. 
object? -> Details about 'object', use 'object??' for extra details. 

In [1]: <it hangs right here...> 

當我-i運行:

$ ipython -i 
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] 
Type "copyright", "credits" or "license" for more information. 

IPython 5.1.0 -- An enhanced Interactive Python. 
?   -> Introduction and overview of IPython's features. 
%quickref -> Quick reference. 
help  -> Python's own help system. 
object? -> Details about 'object', use 'object??' for extra details. 

In [1]: import os 

In [2]: import sys 

In [3]: os.path.dirname(sys.executable) 
Out[3]: 
'C:\\Anaconda3' 

我的終端,只要我使用ipython退出時崩潰,但如果我用python代替工作正常。我知道你前一段提出這個問題,但如果你仍然感興趣this page可能對你有用。

相關問題