Installation Problem

Discussion in 'Python' started by Marshall Dudley, Jun 4, 2006.

  1. I am trying to install python, but am having problems. I did what the
    README file said, and it created an executible code in the current
    directory as it said it would when I typed "make". It seemed to say to
    copy the executable over to the /usr/local directory, which I did.

    If I type ./python in the directory I did the make in I get:

    execonn# ./python
    Python 2.4.3 (#1, May 31 2006, 07:50:04)
    [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
    Type "help", "copyright", "credits" or "license" for more information.
    >>>


    Which is I believe correct.

    But if I type /usr/local/python I get:

    Python 2.4.3 (#1, May 31 2006, 07:50:04)
    [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

    execonn# /usr/local/python
    Could not find platform independent libraries <prefix>
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    'import site' failed; use -v for traceback
    Python 2.4.3 (#1, May 31 2006, 07:50:04)
    [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
    Type "help", "copyright", "credits" or "license" for more information.
    >>>


    So nothing that tries to use it works.

    Any assistance would be appreciated.

    Thanks,

    Marshall
    Marshall Dudley, Jun 4, 2006
    #1
    1. Advertising

  2. Marshall Dudley wrote:
    > I am trying to install python, but am having problems. I did what the
    > README file said, and it created an executible code in the current
    > directory as it said it would when I typed "make".


    "make" doesn't install the interpreter by itself; you're supposed to use
    "make install" (or "make altinstall") to do that.

    just copying the interpreter binary around won't give you a complete
    install.

    > It seemed to say to copy the executable over to the /usr/local
    > directory, which I did.


    the README says:

    To start building right away (on UNIX): type "./configure" in the
    current directory and when it finishes, type "make". This creates an
    executable "./python"; to install in /usr/local, first do "su root"
    and then "make install".

    the detailed installation section says:

    To install the Python binary, library modules, shared library modules
    (see below), include files, configuration files, and the manual page,
    just type

    make install

    /.../

    </F>
    Fredrik Lundh, Jun 4, 2006
    #2
    1. Advertising

  3. Sorry, this is a FreeBSD system 4.8-RELEASE

    I found another set of documents that say to use the following to
    install::

    python setup.py install

    but after running it, I still have the same problem.

    Marshall

    Marshall Dudley wrote:

    > I am trying to install python, but am having problems. I did what the
    > README file said, and it created an executible code in the current
    > directory as it said it would when I typed "make". It seemed to say to
    > copy the executable over to the /usr/local directory, which I did.
    >
    > If I type ./python in the directory I did the make in I get:
    >
    > execonn# ./python
    > Python 2.4.3 (#1, May 31 2006, 07:50:04)
    > [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
    > Type "help", "copyright", "credits" or "license" for more information.
    > >>>

    >
    > Which is I believe correct.
    >
    > But if I type /usr/local/python I get:
    >
    > Python 2.4.3 (#1, May 31 2006, 07:50:04)
    > [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
    > Type "help", "copyright", "credits" or "license" for more information.
    > >>>

    > execonn# /usr/local/python
    > Could not find platform independent libraries <prefix>
    > Could not find platform dependent libraries <exec_prefix>
    > Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    > 'import site' failed; use -v for traceback
    > Python 2.4.3 (#1, May 31 2006, 07:50:04)
    > [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
    > Type "help", "copyright", "credits" or "license" for more information.
    > >>>

    >
    > So nothing that tries to use it works.
    >
    > Any assistance would be appreciated.
    >
    > Thanks,
    >
    > Marshall
    Marshall Dudley, Jun 4, 2006
    #3
  4. Fredrik Lundh wrote:

    > Marshall Dudley wrote:
    > > I am trying to install python, but am having problems. I did what the
    > > README file said, and it created an executible code in the current
    > > directory as it said it would when I typed "make".

    >
    > "make" doesn't install the interpreter by itself; you're supposed to use
    > "make install" (or "make altinstall") to do that.
    >
    > just copying the interpreter binary around won't give you a complete
    > install.
    >
    > > It seemed to say to copy the executable over to the /usr/local
    > > directory, which I did.

    >
    > the README says:
    >
    > To start building right away (on UNIX): type "./configure" in the
    > current directory and when it finishes, type "make". This creates an
    > executable "./python"; to install in /usr/local, first do "su root"
    > and then "make install".


    Yes, that is what I did. Since I ended up with no executable in /usr/local,
    or /usr/local/bin and it said " This creates an
    executable "./python" (which it did); to install in /usr/local" I copied
    the one it created over to /usr/local, then later /usr/local/bin

    >
    >
    > the detailed installation section says:
    >
    > To install the Python binary, library modules, shared library modules
    > (see below), include files, configuration files, and the manual page,
    > just type
    >
    > make install
    >
    > /.../
    >
    > </F>


    Yes, I typed "make install". But nothing gets put into /usr/local or
    /usr/local/bin without me copying it over. And if I run python it in the
    directory I unpacked it in, it works, but if I run the copy in /usr/local or
    /usr/local/bin it does not.

    I also tried the instuctions on their web site:

    "python setup.py install"

    But get the same result, but it copies and puts the following 3 files in the
    /usr/local/bin dir.

    -rwxr-xr-x 1 root wheel 96 May 31 07:50 idle
    -rwxr-xr-x 1 root wheel 81 May 31 07:50 pydoc
    -rwxr-xr-x 1 root wheel 18017 May 31 07:50 smtpd.py

    Marshall
    Marshall Dudley, Jun 4, 2006
    #4
  5. Marshall Dudley

    Warren Block Guest

    Marshall Dudley <> wrote:
    > Sorry, this is a FreeBSD system 4.8-RELEASE
    >
    > I found another set of documents that say to use the following to
    > install::
    >
    > python setup.py install
    >
    > but after running it, I still have the same problem.


    [top-posting trimmed, please don't do that]

    Doesn't the port work for 4.8? It does work on FreeBSD 4.11, but there
    may have been changes to the ports system since 4.8. (You should
    consider updating to 4.11.)

    There are several patch files in the FreeBSD port, including
    one to setup.py.

    The easiest way is to cvsup your ports tree and then

    cd /usr/ports/lang/python
    make
    make install
    make clean

    --
    Warren Block * Rapid City, South Dakota * USA
    Warren Block, Jun 4, 2006
    #5
  6. Warren Block wrote:

    > Marshall Dudley <> wrote:
    > > Sorry, this is a FreeBSD system 4.8-RELEASE
    > >
    > > I found another set of documents that say to use the following to
    > > install::
    > >
    > > python setup.py install
    > >
    > > but after running it, I still have the same problem.

    >
    > [top-posting trimmed, please don't do that]
    >
    > Doesn't the port work for 4.8? It does work on FreeBSD 4.11, but there
    > may have been changes to the ports system since 4.8. (You should
    > consider updating to 4.11.)
    >
    > There are several patch files in the FreeBSD port, including
    > one to setup.py.
    >
    > The easiest way is to cvsup your ports tree and then
    >
    > cd /usr/ports/lang/python
    > make
    > make install
    > make clean
    >
    > --
    > Warren Block * Rapid City, South Dakota * USA


    Now I have a python that runs, but the application I want to run it on
    "denyhosts" gives me the following error:

    Python >= 2.3 required. You are using: 2.2.2 (#1, Jun 4 2006, 16:29:13)
    [GCC 2.95.4 20020320 [FreeBSD]]

    ######################################################################

    Visit http://www.python.org and download a more recent version of
    Python.

    You should install this version in addition to your current version
    (rather than upgrading your current version) because your system might
    depend on the current version. After installing the newer version, for
    instance version 2.4, simply invoke DenyHosts explicitly with the new
    version of python, eg:

    $ python2.4 ./denyhosts.py

    ######################################################################

    Is it not possible to install the latest version of python on my FreeBSD
    system? Upgrading the FreeBSD is not an option since this is a production
    system and everything else is working fine.

    Marshall
    Marshall Dudley, Jun 5, 2006
    #6
  7. Marshall Dudley wrote:

    > Is it not possible to install the latest version of python on my FreeBSD
    > system? Upgrading the FreeBSD is not an option since this is a production
    > system and everything else is working fine.


    that's really a FreeBSD question, isn't it?

    > You are using: 2.2.2 (#1, Jun 4 2006, 16:29:13)


    Python 2.2.2 was originally released in 2002, but your copy was built
    yesterday? did the FreeBSD source kit you got really contain a four
    year old release? heck, it's not even the 2.2 release in the 2.2
    series, and there's been two major releases since then.

    are you sure you cannot get a *prebuilt* newer version from some FreeBSD
    repository?

    or if that's not possible, use the *standard* python.org source kit?
    after all, it's known to build and install on virtually any modern Unix
    or Unix-like system (and most non-Unix systems too), and you're free to
    install it everywhere you want (and the default on Unix is /usr/local,
    so you don't even have to read the README; just make sure you use the
    real thing, instead of some botched FreeBSD-specific source kit).

    </F>
    Fredrik Lundh, Jun 5, 2006
    #7
  8. Fredrik Lundh wrote:

    > Marshall Dudley wrote:
    >
    > > Is it not possible to install the latest version of python on my FreeBSD
    > > system? Upgrading the FreeBSD is not an option since this is a production
    > > system and everything else is working fine.

    >
    > that's really a FreeBSD question, isn't it?
    >
    > > You are using: 2.2.2 (#1, Jun 4 2006, 16:29:13)

    >
    > Python 2.2.2 was originally released in 2002, but your copy was built
    > yesterday? did the FreeBSD source kit you got really contain a four
    > year old release? heck, it's not even the 2.2 release in the 2.2
    > series, and there's been two major releases since then.


    No, there was no copy on the system. When I did the make the last time as
    directed in the previous message, it downloaded it from the python site, then
    compiled and installed it. The 2.2.2 release is what it downloaded.

    >
    >
    > are you sure you cannot get a *prebuilt* newer version from some FreeBSD
    > repository?


    I did compile a new copy originally, and it worked fine in the directory that I
    compiled it in, but when moved to the /usr/local/bin directory where it should
    have installed, it complains that it cannot find it's library. It may just be a
    matter of what directory I should put the sources into and compile from, but I
    can find nowhere that this information is provided, everything I see indicates I
    can compile it in any directory.

    >
    >
    > or if that's not possible, use the *standard* python.org source kit?
    > after all, it's known to build and install on virtually any modern Unix
    > or Unix-like system (and most non-Unix systems too), and you're free to
    > install it everywhere you want (and the default on Unix is /usr/local,
    > so you don't even have to read the README; just make sure you use the
    > real thing, instead of some botched FreeBSD-specific source kit).


    That is what I did originally, downloaded the latest version from the main
    python site. I compiled by the README file instructions, and I compiled by the
    instructions on the python url which are different, but both gave identical
    results, compiles fine, runs fine from the directory I compiled in, but will
    error out when I move the executible code to and run it from the /usr/local/bin
    or the /usr/local directory.

    Marshall

    >
    >
    > </F>
    Marshall Dudley, Jun 5, 2006
    #8
  9. Marshall Dudley wrote:

    > That is what I did originally, downloaded the latest version from the main
    > python site. I compiled by the README file instructions, and I compiled by the
    > instructions on the python url which are different, but both gave identical
    > results, compiles fine, runs fine from the directory I compiled in, but will
    > error out when I move the executible code to and run it from the /usr/local/bin
    > or the /usr/local directory.


    deep sigh. alright, one more attempt:

    DO NOT copy any binaries yourself, DO NOT use any bogus FreeBSD source
    distribution, DO NOT download 2.2.2 if you need Python 2.3 or newer, DO
    NOT type random commands into the shell when logged in as root. etc.

    just follow these instructions:

    1) go fetch a the latest source code kit from python.org. I recommend
    getting Python-2.4.3.tgz:

    $ wget http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz

    2) unpack the file to a local temporary directory

    $ tar xvfz Python-2.4.3.tar.gz
    $ cd Python-2.4.3

    3) in that directory, type the following commands:

    $ ./configure
    $ make
    $ ./python

    4) verify that the ./python command prints the following:

    Python 2.4.3 [followed by some number, and today's date]
    Type "help", "copyright", "credits" or "license" ...
    >>>


    5) press control-D to leave the interpreter

    6) login as root, and type

    # make install

    (or use sudo, or whatever mechanism you usually do to run a command as root)

    7) log out from root. that's it. python is now installed as
    "/usr/local/bin/python", *and* as "/usr/local/bin/python2.4". support
    libraries and other files are installed under /usr/local/lib/python2.4
    and /usr/local/include/python2.4.

    </F>
    Fredrik Lundh, Jun 5, 2006
    #9
  10. Fredrik Lundh wrote:

    > Marshall Dudley wrote:
    >
    > > That is what I did originally, downloaded the latest version from the main
    > > python site. I compiled by the README file instructions, and I compiled by the
    > > instructions on the python url which are different, but both gave identical
    > > results, compiles fine, runs fine from the directory I compiled in, but will
    > > error out when I move the executible code to and run it from the /usr/local/bin
    > > or the /usr/local directory.

    >
    > deep sigh. alright, one more attempt:
    >
    > DO NOT copy any binaries yourself, DO NOT use any bogus FreeBSD source
    > distribution, DO NOT download 2.2.2 if you need Python 2.3 or newer, DO
    > NOT type random commands into the shell when logged in as root. etc.
    >
    > just follow these instructions:
    >
    > 1) go fetch a the latest source code kit from python.org. I recommend
    > getting Python-2.4.3.tgz:
    >
    > $ wget http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz


    OK, did that again.

    >
    >
    > 2) unpack the file to a local temporary directory
    >
    > $ tar xvfz Python-2.4.3.tar.gz
    > $ cd Python-2.4.3


    did that again.

    >
    > 3) in that directory, type the following commands:
    >
    > $ ./configure
    > $ make
    > $ ./python
    >


    OK, did that, got:

    Python 2.4.3 (#2, Jun 5 2006, 11:15:03)
    [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
    Type "help", "copyright", "credits" or "license" for more information.
    >>>


    >
    > 4) verify that the ./python command prints the following:
    >
    > Python 2.4.3 [followed by some number, and today's date]
    > Type "help", "copyright", "credits" or "license" ...
    > >>>

    >
    > 5) press control-D to leave the interpreter


    Ok, did that.

    >
    >
    > 6) login as root, and type
    >
    > # make install


    OK, did that again.

    >
    > (or use sudo, or whatever mechanism you usually do to run a command as root)
    >
    > 7) log out from root. that's it. python is now installed as
    > "/usr/local/bin/python", *and* as "/usr/local/bin/python2.4". support
    > libraries and other files are installed under /usr/local/lib/python2.4
    > and /usr/local/include/python2.4.
    >
    > </F>


    OK, that is exactly what I had done previously, but this time there IS a copy of
    python in the /usr/local/bin directory, and this time it DOES work. Don't know why
    the previous times it put in the /usr/local/bin/pydoc, /usr/local/bin/idle and
    /usr/local/bin/smtpd.py files, but not the python executable one.

    Thanks,

    Marshall
    Marshall Dudley, Jun 5, 2006
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Microsoft
    Replies:
    0
    Views:
    2,930
    Microsoft
    Sep 4, 2003
  2. Replies:
    0
    Views:
    625
  3. Replies:
    0
    Views:
    2,596
  4. Noah
    Replies:
    4
    Views:
    581
  5. Apogee

    Problem VS.net Installation

    Apogee, Jul 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    371
    Apogee
    Jul 3, 2003
Loading...

Share This Page