René's URL Explorer Experiment


Title: [Solved] How can i solve this error "ModuleNotFoundError: No module named 'encodings'" under ubuntu20.04? · pythonnet/pythonnet · Discussion #2147 · GitHub

Open Graph Title: [Solved] How can i solve this error "ModuleNotFoundError: No module named 'encodings'" under ubuntu20.04? · pythonnet/pythonnet · Discussion #2147

X Title: [Solved] How can i solve this error "ModuleNotFoundError: No module named 'encodings'" under ubuntu20.04? · pythonnet/pythonnet · Discussion #2147

Description: [Solved] How can i solve this error "ModuleNotFoundError: No module named 'encodings'" under ubuntu20.04?

Open Graph Description: I want to use Python in a .NET project, and under Windows, I can use Python with the python3.10.dll. Unfortunately, this project needs to run in a Docker container. First, I tried to set up all com...

X Description: I want to use Python in a .NET project, and under Windows, I can use Python with the python3.10.dll. Unfortunately, this project needs to run in a Docker container. First, I tried to set up all com...

Opengraph URL: https://github.com/pythonnet/pythonnet/discussions/2147

X: @github

direct link

Domain: Github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"[Solved] How can i solve this error \"ModuleNotFoundError: No module named 'encodings'\" under ubuntu20.04?","text":"\u003cp dir=\"auto\"\u003eI want to use Python in a .NET project, and under Windows, I can use Python with the python3.10.dll. Unfortunately, this project needs to run in a Docker container. First, I tried to set up all components in Ubuntu 20.04, but when I linked the python3.10.so to Runtime.PythonDLL, I got the following error:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ePython path configuration:\u003cbr\u003e\nPYTHONHOME = '/usr/lib/python3.10/'\u003cbr\u003e\nPYTHONPATH = '/usr/lib/:/usr/lib/python3.10/:/usr/lib/python3.10/encodings/'\u003cbr\u003e\nprogram name = 'python3'\u003cbr\u003e\nisolated = 0\u003cbr\u003e\nenvironment = 1\u003cbr\u003e\nuser site = 1\u003cbr\u003e\nimport site = 1\u003cbr\u003e\nsys._base_executable = '/usr/local/bin/python3'\u003cbr\u003e\nsys.base_prefix = ''\u003cbr\u003e\nsys.base_exec_prefix = ''\u003cbr\u003e\nsys.platlibdir = 'lib'\u003cbr\u003e\nsys.executable = '/usr/local/bin/python3'\u003cbr\u003e\nsys.prefix = ''\u003cbr\u003e\nsys.exec_prefix = ''\u003cbr\u003e\nsys.path = [\u003cbr\u003e\n'/usr/lib/python3.10/;/usr/lib/python3.10/encodings/;/home/ubuntu/python_packages/lib/python3.10/site-packages/;/home/ubuntu/C#Projject/used_python/',\u003cbr\u003e\n]\u003cbr\u003e\nFatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding\u003cbr\u003e\nPython runtime state: core initialized\u003cbr\u003e\nModuleNotFoundError: No module named 'encodings'\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eCurrent thread 0x00007f1641311740 (most recent call first):\u003cbr\u003e\n\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eMy guess is that I'm not setting some necessary library, but I don't know which one it is.\u003c/p\u003e","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003eI could fix it. Unfortunately, under Ubuntu, we cannot use the PYTHONHOME and PYTHONPATH variables. If you use these variables, you will get the \"ModuleNotFoundError: No module named 'encodings'\" error. If you use your own packages, such as creating a class structure and importing it into your project file, you must copy it to the \"dist-packages\" folder.\u003c/p\u003e","upvoteCount":2,"url":"https://github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-5731899"}}}

route-pattern/:user_id/:repository/discussions/:number(.:format)
route-controllerdiscussions
route-actionshow
fetch-noncev2:96516415-5c67-ff0b-47e8-030bd4c67b94
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-id8516:27D737:7CA6FD:AC1B5B:6A63AC5B
html-safe-noncec78bd9b0e2b8144c5b695c1c18e4b46a31b4cbe57163edd23f752ccc020e52b1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTE2OjI3RDczNzo3Q0E2RkQ6QUMxQjVCOjZBNjNBQzVCIiwidmlzaXRvcl9pZCI6IjQ5MzM5MjIzMzI1MDYwNDE0MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccf6c8c712348adc5b0a6b0558020c75e1432289be83298d62bff3e7d18473ca1
hovercard-subject-tagdiscussion:5110503
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///discussions/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/pythonnet/pythonnet/discussions/2147
twitter:imagehttps://opengraph.githubassets.com/e7c89b65a392db02536d455eddf2470a9fbb511b1971af437a43593d8728fad1/pythonnet/pythonnet/discussions/2147
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e7c89b65a392db02536d455eddf2470a9fbb511b1971af437a43593d8728fad1/pythonnet/pythonnet/discussions/2147
og:image:altI want to use Python in a .NET project, and under Windows, I can use Python with the python3.10.dll. Unfortunately, this project needs to run in a Docker container. First, I tried to set up all com...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec69b5576237034cb6ab5477391df7811093a00579a751b33bed4b527d68aade6
turbo-cache-controlno-preview
go-importgithub.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git
octolytics-dimension-user_id6050430
octolytics-dimension-user_loginpythonnet
octolytics-dimension-repository_id14748123
octolytics-dimension-repository_nwopythonnet/pythonnet
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14748123
octolytics-dimension-repository_network_root_nwopythonnet/pythonnet
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5c31956f7a31ef033ef93ba813dcb6f7e8eb0972
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://Github.com/pythonnet/pythonnet/discussions/2147#start-of-content
https://Github.com/
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fdiscussions%2F2147
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fdiscussions%2F2147
Sign up https://Github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fdiscussions%2Fshow&source=header-repo&source_repo=pythonnet%2Fpythonnet
Reloadhttps://Github.com/pythonnet/pythonnet/discussions/2147
Reloadhttps://Github.com/pythonnet/pythonnet/discussions/2147
Reloadhttps://Github.com/pythonnet/pythonnet/discussions/2147
Please reload this pagehttps://Github.com/pythonnet/pythonnet/discussions/2147
pythonnet https://Github.com/pythonnet
pythonnethttps://Github.com/pythonnet/pythonnet
Notifications https://Github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Fork 777 https://Github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Star 5.5k https://Github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Code https://Github.com/pythonnet/pythonnet
Issues 151 https://Github.com/pythonnet/pythonnet/issues
Pull requests 17 https://Github.com/pythonnet/pythonnet/pulls
Discussions https://Github.com/pythonnet/pythonnet/discussions
Actions https://Github.com/pythonnet/pythonnet/actions
Projects https://Github.com/pythonnet/pythonnet/projects
Wiki https://Github.com/pythonnet/pythonnet/wiki
Security and quality 0 https://Github.com/pythonnet/pythonnet/security
Insights https://Github.com/pythonnet/pythonnet/pulse
Code https://Github.com/pythonnet/pythonnet
Issues https://Github.com/pythonnet/pythonnet/issues
Pull requests https://Github.com/pythonnet/pythonnet/pulls
Discussions https://Github.com/pythonnet/pythonnet/discussions
Actions https://Github.com/pythonnet/pythonnet/actions
Projects https://Github.com/pythonnet/pythonnet/projects
Wiki https://Github.com/pythonnet/pythonnet/wiki
Security and quality https://Github.com/pythonnet/pythonnet/security
Insights https://Github.com/pythonnet/pythonnet/pulse
Answered https://Github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-5731899
smartin-pckhttps://Github.com/smartin-pck
smartin-pck https://Github.com/smartin-pck
Q&Ahttps://Github.com/pythonnet/pythonnet/discussions/categories/q-a
[Solved] How can i solve this error "ModuleNotFoundError: No module named 'encodings'" under ubuntu20.04? https://Github.com/pythonnet/pythonnet/discussions/2147#top
smartin-pck https://Github.com/smartin-pck
Answered https://Github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-5731899
smartin-pckhttps://Github.com/smartin-pck
Return to tophttps://Github.com/pythonnet/pythonnet/discussions/2147#top
Please reload this pagehttps://Github.com/pythonnet/pythonnet/discussions/2147
https://Github.com/pythonnet/pythonnet/discussions/2147
smartin-pck https://Github.com/smartin-pck
Apr 20, 2023 https://Github.com/pythonnet/pythonnet/discussions/2147#discussion-5110503
smartin-pck https://Github.com/smartin-pck
Apr 26, 2023 https://github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-5731899
View full answer https://Github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-5731899
Oldest https://Github.com/pythonnet/pythonnet/discussions/2147?sort=old
Newest https://Github.com/pythonnet/pythonnet/discussions/2147?sort=new
Top https://Github.com/pythonnet/pythonnet/discussions/2147?sort=top
Please reload this pagehttps://Github.com/pythonnet/pythonnet/discussions/2147
https://Github.com/pythonnet/pythonnet/discussions/2147
Please reload this pagehttps://Github.com/pythonnet/pythonnet/discussions/2147
https://Github.com/pythonnet/pythonnet/discussions/2147
smartin-pck https://Github.com/smartin-pck
Apr 26, 2023 https://Github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-5731899
https://Github.com/filmor
Please reload this pagehttps://Github.com/pythonnet/pythonnet/discussions/2147
https://Github.com/pythonnet/pythonnet/discussions/2147
filmorhttps://Github.com/filmor
Apr 26, 2023 https://Github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-5734360
https://Github.com/iFreilicht
Please reload this pagehttps://Github.com/pythonnet/pythonnet/discussions/2147
https://Github.com/pythonnet/pythonnet/discussions/2147
iFreilichthttps://Github.com/iFreilicht
Nov 27, 2025 https://Github.com/pythonnet/pythonnet/discussions/2147#discussioncomment-15094004
#2217 (comment)https://github.com/pythonnet/pythonnet/discussions/2217#discussioncomment-6789448
smartin-pckhttps://Github.com/smartin-pck
Sign up for freehttps://Github.com/join?source=comment-repo
Sign in to commenthttps://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fdiscussions%2F2147
🙏 Q&A https://Github.com/pythonnet/pythonnet/discussions/categories/q-a
https://Github.com/smartin-pck
https://Github.com/filmor
https://Github.com/iFreilicht
https://Github.com/pythonnet/pythonnet/discussions/2147
https://Github.com/settings/replies?return_to=1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.