Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8214245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:23:49+00:00 2026-06-07T11:23:49+00:00

Having trouble getting pyflakes to run on windows. On Windows there is no apt

  • 0

Having trouble getting pyflakes to run on windows.

On Windows there is no apt install , so… what to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:23:50+00:00Added an answer on June 7, 2026 at 11:23 am

    I downloaded the pyflakes tgz file (v0.5.0) from Pypi, and was able to unpack it with a tar tool.

    Now I had a directory that looked like this:

    C:\temp>dir pyflakes-0.5.0
     Volume in drive C has no label.
     Volume Serial Number is A421-40B4
    
     Directory of C:\temp\pyflakes-0.5.0
    
    07/11/2012  06:28 PM    <DIR>          .
    07/11/2012  06:28 PM    <DIR>          ..
    09/03/2011  10:09 AM    <DIR>          bin
    07/11/2012  06:28 PM    <DIR>          build
    09/03/2011  09:02 AM             1,057 LICENSE
    09/03/2011  09:02 AM             1,696 NEWS.txt
    09/03/2011  10:09 AM               763 PKG-INFO
    09/03/2011  10:09 AM    <DIR>          pyflakes
    09/03/2011  09:30 AM             1,075 setup.py
                   4 File(s)          4,591 bytes
                   5 Dir(s)  74,326,130,688 bytes free
    

    Next I tried the obvious: run the setup.py file. It told me to use install, so

    \python27\python.exe setup.py install 
    

    That gave me a happy message about building and installing the module, culminating in

     Writing C:\Python27\Lib\site-packages\pyflakes-0.5.0-py2.7.egg-info
    

    ok, now …

    (dinner break)

    now, the install of pyflakes puts a file called “pyflakes” into c:\Python27\Scripts.

    To run the pyflakes checker, use this:

    \Python27\python.exe \Python27\Scripts\pyflakes myfile.py
    

    That’s it! It works.


    But there is more to the story. The contents of the file c:\Python27\Scripts\pyflakes is python source code. Now, you may think, what’s the deal with a python module with no .py extension? Other files in that directory are correctly marked with the .py extension. It just feels wrong to leave the extension off. Why would they do that? If you get creative and rename that file called “pyflakes” to “pyflakes.py”, and then try to run that, you will get this error:

    C:\dev\python>\Python27\python.exe \Python27\Scripts\pyflakes.py import1.py
    Traceback (most recent call last):
      File "\Python27\Scripts\pyflakes.py", line 3, in <module>
        from pyflakes.scripts.pyflakes import main
      File "C:\Python27\Scripts\pyflakes.py", line 3, in <module>
        from pyflakes.scripts.pyflakes import main
    ImportError: No module named scripts.pyflakes
    

    The problem is a naming clash between the (renamed) pyflakes.py file, and the module that it imports, which is located at c:\Python27\Lib\site-packages\pyflakes. So, don’t rename it that way. If you insist on having a .py extension, then choose something other than pyflakes.py for the name – for example, pyflakes_driver.py works just fine. Some people use runpyflakes.py .

    If you do run into the problem described above, you also need to remove the pyflakes.pyc that may have been created in the c:\Python27\Scripts directory.


    People might also want to create a .bat or .cmd file to launch pyflakes. To help with this I created c:\Python27\pyflakes.cmd, with these contents:

    @echo off
    SETLOCAL
    if  _%1==_ goto USAGE
    %~dp0\python.exe %~dp0\Scripts\pyflakes %*
    goto ALL_DONE
    
    :USAGE
      echo usage:  pyflakes ^<file^> [^<optionalargs^>]
      echo run the pyflakes syntax checker on a python source file.
    
    :ALL_DONE
    ENDLOCAL
    

    ok, that’s it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble getting OpenGL 3.2 to run on Lion (osx 10.7.4) using Derelict3
I'm having trouble getting my app to install on a tablet through the market.
okay so im having trouble getting this countdown to run , i provide the
I'm having trouble getting my new SBT task 'install' to depend on the OneJar
I am having trouble getting my button animation to run when my activity starts
im having trouble getting a string (containing a URL) from one activity to another.
Im having trouble getting my JTable that im using to display either check boxes
I'm having trouble getting the CanExecute method of my command to work property. I've
I'm having trouble getting Tire working using ElasticSearch with the Bonsai addon on the
I'm currently having trouble getting example code for using tweepy to access Twitter's Streaming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.