Results 1 to 11 of 11

Thread: Python Visual C++ Runtime Library Error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Magefsx's Avatar Campidoctor
    Join Date
    Dec 2009
    Location
    England
    Posts
    1,564

    Default Python Visual C++ Runtime Library Error

    Essentially this:
    http://bugs.python.org/issue9890
    When I run the command line solution suggested, I get this message back:
    Import Error: No module named site
    And what is the "-n flag"?
    I'm a bit of a noob when it comes to programming, but from the little I've managed on my friends laptop I decided to take it up. Seeing as Pythons quite a nice language, in comparison to looking at Java/C++, I'd quite like to be able to run it on win7.
    Any help would be greatly appreciated!
    Last edited by Magefsx; January 24, 2011 at 11:32 AM.

  2. #2
    Dewy's Avatar Something Witty
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    4,697

    Default Re: Python Visual C++ Runtime Library Error

    From what little information you have given it sounds like you are having problems with IDLE not python. Install notepad++ instead, it's much better than IDLE. But if you want to fix the problem with IDLE, I suggest install a visual C++ redistributable, which sounds like the problem the guy in the link is having. For future reference you're being to ambiguous with your question, such as "essentially this" is not even slightly helpful in determining your problem.
    Oh no the picture of my dog disappeared!

  3. #3

    Default Re: Python Visual C++ Runtime Library Error

    Quote Originally Posted by Dewy View Post
    From what little information you have given it sounds like you are having problems with IDLE not python. Install notepad++ instead, it's much better than IDLE. But if you want to fix the problem with IDLE, I suggest install a visual C++ redistributable, which sounds like the problem the guy in the link is having. For future reference you're being to ambiguous with your question, such as "essentially this" is not even slightly helpful in determining your problem.
    Can Notepad++ debug?
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  4. #4
    Magefsx's Avatar Campidoctor
    Join Date
    Dec 2009
    Location
    England
    Posts
    1,564

    Default Re: Python Visual C++ Runtime Library Error

    I had microsoft visual C++ installed before I installed IDLE (=>above error), which still didn't work after uninstalling visual C++ (same error).
    When I run "Python(command line)", the command line box appears for a fraction of a second, then disappears
    When I run IDLE, nothing happens at all (no error box).
    The above 2 problems occur when trying to run python 2.7
    I get the error when trying to run the IDLE with python 3.1

  5. #5
    Friend
    Moderator Emeritus

    Join Date
    Oct 2006
    Location
    Beautiful America
    Posts
    8,626

    Default Re: Python Visual C++ Runtime Library Error

    When I run "Python(command line)", the command line box appears for a fraction of a second, then disappears
    That's probably because you don't have any pause or input happening, so when the script is done, or an error happens, it closes.

    If you're running this python call in a batch file, put a pause>nul at the end of the batch file, and then it will pause when done so you can see the output.


    Retired moderator of TWC
    | Under the patronage of Atterdag

  6. #6
    Magefsx's Avatar Campidoctor
    Join Date
    Dec 2009
    Location
    England
    Posts
    1,564

    Default Re: Python Visual C++ Runtime Library Error

    And where do I enter that?
    Opening the batch file gives me no opportunity to enter this

  7. #7
    Dewy's Avatar Something Witty
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    4,697

    Default Re: Python Visual C++ Runtime Library Error

    Quote Originally Posted by Magefsx View Post
    And where do I enter that?
    Opening the batch file gives me no opportunity to enter this
    Open it in a text editor.
    Oh no the picture of my dog disappeared!

  8. #8
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: Python Visual C++ Runtime Library Error

    I've edited Python batch files in Notepad++. That is what the unpack_all.bat in Medieval II Total War\tools\unpacker is written in.

  9. #9
    Magefsx's Avatar Campidoctor
    Join Date
    Dec 2009
    Location
    England
    Posts
    1,564

    Default Re: Python Visual C++ Runtime Library Error

    Ok, thats done. Now when I run the batch file, I get a command box with a flashing white underscore. No text present at all.
    What do I do now?

  10. #10

    Default Re: Python Visual C++ Runtime Library Error

    Can you post the code here?
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  11. #11
    Magefsx's Avatar Campidoctor
    Join Date
    Dec 2009
    Location
    England
    Posts
    1,564

    Default Re: Python Visual C++ Runtime Library Error

    Code:
    @echo off
    rem Start IDLE using the appropriate Python interpreter
    set CURRDIR=%~dp0
    start "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9
    pause>nul
    From the batch file idle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •