2016-08-02 32 views
0

Also, wenn ich diese Befehle in das Terminal schreiben nur bekomme ich diese Fehler:~/.bash_profile in OSX Version 10.11.6 für virtualenv und Python

/ L/F/P  Versions  export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3                  ➶ 127  04:21:45 PM 
/ L/F/P  Versions  source /usr/local/bin/virtualenvwrapper.sh                       04:21:52 PM 
Expected end of the statement, but instead found a '&' 
/usr/local/bin/virtualenvwrapper.sh (line 67): if [ "$OS" = "Windows_NT" ] && ([ "$MSYSTEM" = "MINGW32" ] || [ "$MSYSTEM" = "MINGW64" ]) 
                      ^
from sourcing file /usr/local/bin/virtualenvwrapper.sh 
    called on standard input 

source: Error while reading file '/usr/local/bin/virtualenvwrapper.sh' 

Auch wenn ich sie in ~/.bash_profile schreibe ich diese Fehler erhalten :

/ L/F/P  Versions  vi ~/.bash_profile                             04:18:50 PM 
/ L/F/P  Versions  source ~/.bash_profile                            04:21:11 PM 
Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'. 
~/.bash_profile (line 3): [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile 
                ^
from sourcing file ~/.bash_profile 
    called on standard input 

source: Error while reading file '/Users/mona/.bash_profile' 

ich habe diese in mein ~/.bash_profile:

~/.bash_profile 
    1 export PATH=$PATH:/usr/local/go/bin 
    2 
    3 [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile 
    4 
    5 [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* 
    6 
    7 # Setting PATH for Python 3.4 
    8 # The orginal version is saved in .bash_profile.pysave 
    9 PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}" 
10 export PATH 
11 
12 # added by Anaconda2 2.4.1 installer 
13 export PATH="/Users/mona/anaconda/bin:$PATH" 
14 
15 compresspdf() { 
16  gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/${3:-"screen"} -dCompatibilityLevel=1.4 -sOutputFile=$2 $1 
17  } 
18 
19 
20 export PATH="/usr/local/sbin:$PATH" 
21 export PATH=/usr/local/bin:$PATH 
22 export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3 
23 source /usr/local/bin/virtualenvwrapper.sh 
~ 

ich bin versuchen, diesem Tutorial zu folgen:

http://www.pyimagesearch.com/2015/06/29/install-opencv-3-0-and-python-3-4-on-osx/ 

Vielen Dank für jede Hilfe oder einen Kommentar.

/ L/F/P  Versions  python                                04:28:32 PM 
Python 3.5.2 (default, Jul 28 2016, 21:28:07) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
+1

Ihre Shell ist nicht Bash. Die Befehle dort sind für die Verwendung mit 'bash' Shell gedacht. Als schnelle Lösung können Sie bash einfach durch Eingabe von 'bash' starten. Angenommen, es ist installiert. – spectras

+1

Ich fand auch [diesen Link] (http://osxdaily.com/2012/03/21/change-shell-mac-os-x/), der zu erklären scheint, wie man die Standard-Shell ändert. – spectras

+0

Ich weiß, dass ich 'bash' Befehl verwenden kann, um bash zu verschieben –

Antwort

1

Es sieht aus wie Sie fish Shell verwenden. Ihr bash Profil geschrieben Elemente verwendet, die von Fisch anscheinend nicht unterstützt werden, finden Sie speziell

Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'. 

Aus, wenn Sie versucht haben, Ihre bash Profil zu beziehen. Sie müssen möglicherweise ein anderes Tutorial finden, um zu folgen, die Virtualenvs selbst erstellen oder versuchen, die Bash-Teile des Tutorials zu Fisch zu übersetzen.

+0

können wir Fisch Shell kompatibel mit Bash Profil machen? –

+0

Nein, aber ich denke, Sie können stattdessen https://github.com/adambrenecki/virtualfish verwenden –