python - Having Trouble Installing iPython -


well, python working perfectly. of sudden, gave me this:

-bash: ipython: command not found 

i did play around bash profiles, i'm beginner don't know did. need help.

anyway, tried doing , got this:

eddy-lopez-torres-computer:~ eddylopez-torres$ pip install ipython -bash: pip: command not found eddy-lopez-torres-computer:~ eddylopez-torres$ sudo python setup.py install python: can't open file 'setup.py': [errno 2] no such file or directory eddy-lopez-torres-computer:~ eddylopez-torres$ sudo python setup.py install python: can't open file 'setup.py': [errno 2] no such file or directory eddy-lopez-torres-computer:~ eddylopez-torres$ cd downloads/ eddy-lopez-torres-computer:downloads eddylopez-torres$ cd labtools-0.2.2 eddy-lopez-torres-computer:labtools-0.2.2 eddylopez-torres$ python setup.py install running install checking .pth file support in /library/python/2.7/site-packages/ /usr/bin/python -e -c pass test passed: /library/python/2.7/site-packages/ appears support .pth files running bdist_egg running egg_info writing labtools.egg-info/pkg-info writing top-level names labtools.egg-info/top_level.txt writing dependency_links labtools.egg-info/dependency_links.txt reading manifest file 'labtools.egg-info/sources.txt' writing manifest file 'labtools.egg-info/sources.txt' installing library code build/bdist.macosx-10.10-intel/egg running install_lib running build_py creating build/bdist.macosx-10.10-intel/egg error: not create 'build/bdist.macosx-10.10-intel/egg': permission denied 

i tried following post:

chances @ 1 point tried running python setup.py under sudo , have dist directory belonging root. clear out existing dist subdirectory in build directory , rerun:

sudo rm -rf ./dist archflags='-arch x86_64' python setup.py install 

if permission errors in final install step, may need run install step under sudo:

sudo bash export archflags='-arch x86_64' /path/to/same/python2.7 setup.py install exit 

but it's better not if don't have to.

but can see...it didn't go planned:

eddy-lopez-torres-computer:labtools-0.2.2 eddylopez-torres$ sudo rm -rf ./dist archflags='arch x86_64' python setup.py install eddy-lopez-torres-computer:labtools-0.2.2 eddylopez-torres$ ipython -bash: ipython: command not found eddy-lopez-torres-computer:labtools-0.2.2 eddylopez-torres$ sudo rm -rf ./dist eddy-lopez-torres-computer:labtools-0.2.2 eddylopez-torres$ archflags='-arch x86_64' python setup.py install python: can't open file 'setup.py': [errno 2] no such file or directory eddy-lopez-torres-computer:labtools-0.2.2 eddylopez-torres$ sudo bash root@eddy-lopez-torres-computer:~/downloads/labtools-0.2.2# export archflags=' arch x86_64'root@eddy-lopez-torres-computer:~/downloads/labtools-0.2.2# /path/to/same/python2.7 setup.py install bash: /path/to/same/python2.7: no such file or directory root@eddy-lopez-torres-computer:~/downloads/labtools-0.2.2# exit 

any appreciated. sooooooo much!

the errors in last quoted terminal session caused command:

sudo rm -rf ./dist archflags='arch x86_64' python setup.py install 

the -r option tells rm recursively delete listed files. -f option tells force deleting them. running command sudo means rm has permission delete anything. can see, using sudo rm -rf should done utmost care.

your command deleted following things:

  • ./dist - folder looking delete
  • archflags='arch x86_64' - next item in command line. wasn't file, -f shuts rm's warnings files don't exist.
  • python - thankfully, real python program not stored in directory working. if had been, have been deleted!
  • setup.py - deleted (and did not intend so)
  • install - not file in directory either.

since setup.py deleted, when attempted run archflags='-arch x86_64' python setup.py install, failed first no such file or directory.

then, copied , pasted command /path/to/same/python2.7 setup.py install. however, command not meant copied , pasted -- path /path/to/same/python2.7 meant replaced whatever path your python installation (probably /usr/bin/python2.7, can find using command which python2 or which python).

your installation won't work anymore, since deleted setup.py file. you'll have new copy of got first one. once that, maybe work.

oh, way, should never copy , paste commands without knowing exactly (especially if contain sudo). when that, you're giving complete control on computer have no reason trust. if don't understand command, start googling. commands can figured out little bit of research.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -