Homebrew Python non si collega

1

Sto cercando di seguire alcuni tutorial in cui installa OpenCV, ma mi richiedono che l'output di which python sia /usr/local/bin/python . Non importa quello che provo, rimane come /usr/bin/python/

My .bash_profile ha il seguente aspetto:

export PATH=/usr/local/bin:$PATH
alias python='/usr/local/bin/python'

E il mio /usr/local/bin/ assomiglia a:

MBP:bin ar$ ls /usr/local/bin/
2to3                idle3.7             pbr             smtpd2.7.py
2to3-2              jpegtran            pip             smtpd2.py
2to3-2.7            lame                pip2                tiff2bw
2to3-3.7            libpng-config           pip2.7              tiff2pdf
apm             libpng16-config         pip3                tiff2ps
atom                lzcat               pip3.7              tiff2rgba
bower               lzcmp               png-fix-itxt            tiffcmp
brew                lzdiff              pngfix              tiffcp
cjpeg               lzegrep             ppm2tiff            tiffcrop
djpeg               lzfgrep             pydoc2              tiffdither
easy_install-3.7        lzgrep              pydoc2.7            tiffdump
exrenvmap           lzless              pydoc3              tiffinfo
exrheader           lzma                pydoc3.7            tiffmedian
exrmakepreview          lzmadec             python2             tiffset
exrmaketiled            lzmainfo            python2-config              tiffsplit
exrmultipart            lzmore              python2.7           unlzma
exrmultiview            mvn             python2.7-config        unxz
exrstdattr          mvnDebug            python3             virtualenv
f2py                mvnyjp              python3-32          wrjpgcom
f2py3.6             ng              python3-config          x264
fax2ps              node                python3.7           xz
fax2tiff            npm             python3.7-32            xzcat
ffmpeg              npx             python3.7-config        xzcmp
ffprobe             opencv_annotation       python3.7m          xzdec
ffserver            opencv_createsamples        python3.7m-config           xzdiff
gdbm_dump           opencv_interactive-calibration  pythonw2                xzegrep
gdbm_load           opencv_traincascade     pythonw2.7          xzfgrep
gdbmtool            opencv_version          pyvenv              xzgrep
idle2               opencv_visualisation        pyvenv-3.7          xzless
idle2.7             opencv_waldboost_detector   raw2tiff            xzmore
idle3               pal2rgb             rdjpgcom

Per favore fatemi sapere cosa posso fare per risolvere questo problema. Grazie!

    
posta user287474 22.12.2017 - 22:20
fonte

1 risposta

1
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python

dovrebbe consentire di eseguire v3 semplicemente chiamando python .

    
risposta data 22.12.2017 - 22:43
fonte

Leggi altre domande sui tag