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

  • Home
  • SEARCH
  • 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 9242155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:31:24+00:00 2026-06-18T08:31:24+00:00

I am not able to get compiled version of the StdLib to work. I

  • 0

I am not able to get compiled version of the StdLib to work.

I created an empty visual studio project (called StdLib) and using NUGET loaded with the latest (v2.7.3)IronPython.StdLib which creates a Lib folder in my project with all of the .py scripts. The build action of these files are set to “content” by default but tried compiling both with that setting and “embedded resource”.

in my py script I have:

import clr
clr.AddReference("StdLib")

import os

it finds the Assembly but throws “os module not found” error.

if I package the standard library files as just loose files in the build folder and do the following it works.

var runtime = Python.CreateRuntime();

var engine = Python.GetEngine(runtime);
engine.SetSearchPaths(new string[] { Path.GetDirectoryName(
    Assembly.GetExecutingAssembly().Location) + @"\Lib" });

////load the script
dynamic script = runtime.UseFile(ParserScriptPath);

//execute the script
var result = script.main("result");

My question is

  1. can you compile the standard library into a .Net Assembly through Visual Studio?

  2. If so what should the build action be for the .py code files in the Lib folder?

  3. Then what is the proper method to reference the Assembly so as not to fail when trying to import standard library modules?

I have reviewed the following post: IronPython: EXE compiled using pyc.py cannot import module "os"

but don’t actually have the IronPython installed and not quite sure if that’s the way to go about it. I used NUGET to add both the IronPython and IronPython.StdLib directly to my project. I assumed because I can add the IronPython.StdLib directly to my project via NUGET I could just compile it and reference it.

  • 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-18T08:31:25+00:00Added an answer on June 18, 2026 at 8:31 am

    No, you won’t be able to compile it through Visual Studio (yet). If you want to, you’ll have to download IronPython and use pyc.py to do it from a command line.

    Eventually I’ll have NuGet packages for pre-zipped and pre-compiled version of the stdlib, but I just haven’t got to it yet.

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

Sidebar

Related Questions

I am not able to get my jwysiwyg and Jhtmlarea text editors to work
Summary: I'm able to compile a RAD Studio 2009 project using MSBuild on a
I'm creating a kinect project in Visual Studio 2008 using OpenNi, NITE and OpenGL.
not able to get this, can someone help for this LINQ query? select col1,
I am not able to get the hg head or status for a given
I'm not able to get this persistence file correct... I do not find any
i tried to search this but was not able to get any proper help.I
This seems like a repeated question but i'm not able to get my answer.
I've read the DateFormatting guide and I'm still not able to get a working
I have few Question for which I am not able to get a proper

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.