Installing simplejson issues

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • blwatson@gmail.com

    Installing simplejson issues

    I am trying to install the twitter python wrapper...I got that
    installed just fine, but am having serious troubles getting the
    simplejson package to install. I need help diagnosing where this is
    failing. I am trying to use:



    and I run "python setup.py build" and then "python setup.py install",
    which both seem to work just fine.

    I tried running with easy_install, but that too is not working. I end
    up with:

    simplejson-1.8.1-py2.5-macosx-10.3-fat.egg

    in my:

    /Library/Frameworks/Python.framewor k/Versions/2.5/lib/python2.5/site-
    packages/

    I am on Mac OS X 10.5. Any help would be greatly appreciated.
  • Gabriel Genellina

    #2
    Re: Installing simplejson issues

    En Fri, 28 Mar 2008 16:14:07 -0300, <blwatson@gmail .comescribió:
    I am trying to install the twitter python wrapper...I got that
    installed just fine, but am having serious troubles getting the
    simplejson package to install. I need help diagnosing where this is
    failing. I am trying to use:
    >

    >
    and I run "python setup.py build" and then "python setup.py install",
    which both seem to work just fine.
    I don't understand - if it worked fine, what's the problem?
    I tried running with easy_install, but that too is not working. I end
    up with:
    >
    simplejson-1.8.1-py2.5-macosx-10.3-fat.egg
    >
    in my:
    >
    /Library/Frameworks/Python.framewor k/Versions/2.5/lib/python2.5/site-
    packages/
    >
    I am on Mac OS X 10.5. Any help would be greatly appreciated.
    And then you import simplejson and it fails? Or what?

    --
    Gabriel Genellina

    Comment

    • blwatson@gmail.com

      #3
      Re: Installing simplejson issues

      On Mar 28, 1:57 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.a r>
      wrote:
      En Fri, 28 Mar 2008 16:14:07 -0300, <blwat...@gmail .comescribió:
      >
      I am trying to install the twitter python wrapper...I got that
      installed just fine, but am having serious troubles getting the
      simplejson package to install.  I need help diagnosing where this is
      failing.  I am trying to use:
      >>
      and I run "python setup.py build" and then "python setup.py install",
      which both seem to work just fine.
      >
      I don't understand - if it worked fine, what's the problem?
      >
      I tried running with easy_install, but that too is not working.  I end
      up with:
      >
      simplejson-1.8.1-py2.5-macosx-10.3-fat.egg
      >
      in my:
      >
      /Library/Frameworks/Python.framewor k/Versions/2.5/lib/python2.5/site-
      packages/
      >
      I am on Mac OS X 10.5.  Any help would be greatly appreciated.
      >
      And then you import simplejson and it fails? Or what?
      >
      --
      Gabriel Genellina
      Yes, when I try to import simplejson, it fails
      >>import simplejson
      Traceback (most recent call last):
      File "<pyshell#284>" , line 1, in <module>
      import simplejson
      ImportError: No module named simplejson

      there is not simplejson.py anywhere on my machine. I understand that
      I am new to python and trying to make heads or tails of what has
      happened with this install process. Any help is appreciated.

      Comment

      • Diez B. Roggisch

        #4
        Re: Installing simplejson issues

        blwatson@gmail. com schrieb:
        I am trying to install the twitter python wrapper...I got that
        installed just fine, but am having serious troubles getting the
        simplejson package to install. I need help diagnosing where this is
        failing. I am trying to use:
        >

        >
        and I run "python setup.py build" and then "python setup.py install",
        which both seem to work just fine.
        >
        I tried running with easy_install, but that too is not working. I end
        up with:
        >
        simplejson-1.8.1-py2.5-macosx-10.3-fat.egg
        >
        in my:
        >
        /Library/Frameworks/Python.framewor k/Versions/2.5/lib/python2.5/site-
        packages/
        >
        I am on Mac OS X 10.5. Any help would be greatly appreciated.
        Go to the turbogears file section and download an appropriate version of
        simplejson:



        I presume sj-1.7.4 is sufficient.

        Alternatively, be gentle to your unixish OS that OS X is, and install
        XCode. Which will install the whole GCC chain, making your OS a
        respected member of OS-community - as every system should be able to
        compile C-code, in which itself has been written.

        Then the install should work as well.

        Diez

        Comment

        • blwatson@gmail.com

          #5
          Re: Installing simplejson issues

          On Mar 29, 3:48 pm, "Diez B. Roggisch" <de...@nospam.w eb.dewrote:
          blwat...@gmail. com schrieb:
          >
          >
          >
          I am trying to install the twitter python wrapper...I got that
          installed just fine, but am having serious troubles getting the
          simplejson package to install.  I need help diagnosing where this is
          failing.  I am trying to use:
          >>
          and I run "python setup.py build" and then "python setup.py install",
          which both seem to work just fine.
          >
          I tried running with easy_install, but that too is not working.  I end
          up with:
          >
          simplejson-1.8.1-py2.5-macosx-10.3-fat.egg
          >
          in my:
          >
          /Library/Frameworks/Python.framewor k/Versions/2.5/lib/python2.5/site-
          packages/
          >
          I am on Mac OS X 10.5.  Any help would be greatly appreciated.
          >
          Go to the turbogears file section and download an appropriate version of
          simplejson:
          >

          >
          I presume sj-1.7.4 is sufficient.
          >
          Alternatively, be gentle to your unixish OS that OS X is, and install
          XCode. Which will install the whole GCC chain, making your OS a
          respected member of OS-community - as every system should be able to
          compile C-code, in which itself has been written.
          >
          Then the install should work as well.
          >
          Diez
          I have already installed XCode...my compiel did not break the way the
          above did.

          I have grabbed the .egg file for simplejson 1.7.4 for Mac OS X 10.5 at
          the above link you provided - it has a simplejson dir, with the exact
          files that are in my simplejson directory for 1.8.1 (except none of
          my .py files have been compiled down to bytecode).

          I tried to add the directory "/<somepath>/simplejson" to my sys.path
          in the interpreter, hoping that the call to import simplejson would
          work if the dir was there, even though simplejson.py did not exist is
          that dir, but the encoder, decoder, jsonfilter and scanner .py files
          were all there.

          My problem is that the call "import simplejson" fails. How can I make
          that call work?

          Thanks in advance.

          Comment

          • Gabriel Genellina

            #6
            Re: Installing simplejson issues

            En Sat, 29 Mar 2008 20:54:36 -0300, <blwatson@gmail .comescribió:
            I tried to add the directory "/<somepath>/simplejson" to my sys.path
            in the interpreter, hoping that the call to import simplejson would
            work if the dir was there, even though simplejson.py did not exist is
            that dir, but the encoder, decoder, jsonfilter and scanner .py files
            were all there.
            >
            My problem is that the call "import simplejson" fails. How can I make
            that call work?
            simplejson is a package (a directory with an __init__.py), not a module;
            don't look for simplejson.py
            Its *parent* directory must be in sys.path for Python to find it. Try
            copying the simplejson directory below site-packages (which should be
            already in sys.path)

            --
            Gabriel Genellina

            Comment

            • blwatson@gmail.com

              #7
              Re: Installing simplejson issues

              On Mar 29, 6:42 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.a r>
              wrote:
              En Sat, 29 Mar 2008 20:54:36 -0300, <blwat...@gmail .comescribió:
              >
              I tried to add the directory "/<somepath>/simplejson" to my sys.path
              in the interpreter, hoping that the call to import simplejson would
              work if the dir was there, even though simplejson.py did not exist is
              that dir, but the encoder, decoder, jsonfilter and scanner .py files
              were all there.
              >
              My problem is that the call "import simplejson" fails.  How can I make
              that call work?
              >
              simplejson is a package (a directory with an __init__.py), not a module;  
              don't look for simplejson.py
              Its *parent* directory must be in sys.path for Python to find it. Try  
              copying the simplejson directory below site-packages (which should be  
              already in sys.path)
              >
              --
              Gabriel Genellina
              Gabriel -

              First, thanks for the help. You have solved one problem but created a
              new one. Isn't that always how it works?

              So I copied over the dir, and now I get this error when trying to
              import simplejson:

              <being error>
              The following error occurred while trying to extract file(s) to the
              Python egg
              cache:

              [Errno 13] Permission denied: '/Users/bwatson/.python-eggs/
              simplejson-1.8.1-py2.5-macosx-10.3-fat.egg-tmp/simplejson/tmpJVSqa_.
              $extract'

              The Python egg cache directory is currently set to:

              /Users/bwatson/.python-eggs

              Perhaps your account does not have write access to this directory?
              You can
              change the cache directory by setting the PYTHON_EGG_CACH E environment
              variable to point to an accessible directory.
              <end error>

              So I went looking for that egg...the following exists in my frameworks
              dir:

              simplejson-1.8.1-py2.5-macosx-10.3-fat.egg

              I hate eggs...I am stuck again. Any ideas?

              Comment

              • Gabriel Genellina

                #8
                Re: Installing simplejson issues

                En Sun, 30 Mar 2008 00:39:58 -0300, <blwatson@gmail .comescribió:
                First, thanks for the help. You have solved one problem but created a
                new one. Isn't that always how it works?
                Ouch - yes, sometimes :(
                So I copied over the dir, and now I get this error when trying to
                import simplejson:
                >
                <being error>
                The following error occurred while trying to extract file(s) to the
                Python egg
                cache:[error messages snipped]
                So I went looking for that egg...the following exists in my frameworks
                dir:
                >
                simplejson-1.8.1-py2.5-macosx-10.3-fat.egg
                >
                I hate eggs...I am stuck again. Any ideas?
                I'd remove the egg and all references to it from easy_install.pt h, and use
                the simplejson directory from the source distribution (.tar.gz), as I
                suggested on a previous message.


                --
                Gabriel Genellina

                Comment

                • blwatson@gmail.com

                  #9
                  Re: Installing simplejson issues

                  Rock and roll baby!!! Thanks so much. It took some doing, but many
                  thanks!!!!

                  Comment

                  Working...