Solved [Solved] Python command not found

Hi,

I recently done a fresh install of FreeBSD 10.0 on a new virtual machine. I installed python27 via
Code:
pkg install
which installed fine without any errors.

When I try to run python I get an error
Code:
python: Command not found
.

When I run python2.7
Code:
python2.7
Python 2.7.6 (default, Apr 12 2014, 02:49:52)
[GCC 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502)] on freebsd10
Type "help", "copyright", "credits" or "license" for more information.

I think I need to get this part to work as sickbeard will not run when trying to start the service. Running it with
Code:
/usr/local/sickbeard # python2.7 SickBeard.py
works just fine as it should.
 
Re: Python command not found

Please read /usr/ports/UPDATING entry 20130817:
Code:
2013-08-17

Affects: users of lang/python*

Author: mva@FreeBSD.org

Reason: 
  The lang/python* ports do not install links to 2to3, idle, pydoc, python
  and other binaries anymore. Those were moved into the lang/python2 and
  lang/python3 ports respectively. This change brings us closer to the goal
  of making Python ports usable with different Python versions at the same
  time.

  If you have lang/python2* or lang/python3* installed, please also install
  the associated lang/python2 or lang/python3 port.

  1. update lang/python2* and/or lang/python3*
  2. install lang/python2 and/or lang/python3
  3. install/update lang/python
 
Re: Python command not found

SirDice said:
Please read /usr/ports/UPDATING entry 20130817:

Pretty sure python2 is installed.

pkg install python2
Code:
Updating repository catalogue
python2-2_2 already installed

Should I be looking at installing something else?

# pkg search python
Code:
ap22-mod_python33-3.3.1_6
ap22-mod_python35-3.5.0_1
boost-python-libs-1.55.0
bpython-py27-0.12_1
claws-mail-python-3.9.3
clearsilver-python-0.10.5
compizconfig-python-0.8.4_4
diveintopython-5.4
drpython-py27-3.11.4
gnatpython-20140205
lcms-python-1.19
libopensync-plugin-python-0.22
libproxy-python-0.4.6
libsvm-python-3.10,1
nxt-python-2.2.2_1
plasma-scriptengine-python-4.11.8
postgresql84-plpython-8.4.21_1
postgresql90-plpython-9.0.17
postgresql91-plpython-9.1.13_1
postgresql92-plpython-9.2.8_1
postgresql93-plpython-9.3.4
py27-biopython-1.60_3
py27-dnspython-1.11.1_1
py27-google-api-python-client-1.1
py27-hyperestraier-python-0.10.10
py27-idnkit-python-2.3
py27-ipython-1.2.1_2
py27-krosspython-4.12.4
py27-mmpython-0.4.10_5
py27-postfix-policyd-spf-python-1.2
py27-python-registry-1.0.3
py27-pythonbrew-1.3_1
py27-pythontidy-1.23
py27-telepathy-python-0.15.19_1
python-2.7_1,2
python-doc-html-2.7.6
python-doc-pdf-a4-2.7.6
python-doc-pdf-letter-2.7.6
python-doc-text-2.7.6
python-mode.el-1.0_1,1
python-nexus-0.87_1
python2-2_2
python27-2.7.6_4
python3-3_1
python31-3.1.5_12
python32-3.2.5_9
python33-3.3.5_1
python34-3.4.0
pythoncad-37_1
pythonchess-0.6_2
pythonsudoku-0.13_3
super_mario_bros_python-0.1_1

pkg info python2
Code:
python2-2_2
Name           : python2
Version        : 2_2
Installed on   : Wed May 14 12:11:26 EST 2014
Origin         : lang/python2
Architecture   : freebsd:10:x86:64
Prefix         : /usr/local
Categories     : python lang ipv6
Maintainer     : python@FreeBSD.org
WWW            : http://www.python.org/
Comment        : The "meta-port" for version 2 of the Python interpreter
Flat size      : 0.00B
 
Re: Python command not found

Note that lang/python will by default create symbolic links that point to the python2 command because the default version of python is 2.7. If you want to change it so that the python command starts python3 by default you'll have to recompile lang/python yourself with PYTHON_DEFAULT_VERSION set to for example 3.3 in make.conf(5).
 
Back
Top