Clr import system no module named System
See original GitHub issueHi guys,
I’m trying to use to do an import System in my python code but it won’t work.
Here is what I do: Import clr Import System
inportError: No module named System
So I tried a clr.AddReference, same thing, "AttributeError: ‘module’ object has no attribute ‘AddReference’
Have you guys already had this pb ? Do you need more info ?
Thanks in advance
Environment
- Pythonnet version: 2.2.2
- Clr version 1.0.2
- Python version: 2.7.1 anaconda 2.4.1
- Operating System: windows
Details
-
Describe what you were trying to get done.
TODO
-
What commands did you run to trigger this issue? If you can provide a Minimal, Complete, and Verifiable example this will help us understand the issue.
print('TODO')
- If there was a crash, please include the traceback here.
print('TODO')
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
python 3.x - No module named 'System'
If you want it called System with a capital S (maybe for backward compatability with already-written programs?), use from os import system ......
Read more >No module named 'clr' error - Support
I tried to import pythonnet by using: pip_install('pythonnet'). ... Any idea that can be helful? ... Does installing pythonnet in a system python...
Read more >No module named error for pythonnet package : PY-60225
There is no package for System - that is a .NET CLR namespace, made available for import by clr.AddReference('System') .
Read more >Importing Modules
NET required you to import modules through a special top-level package named CLR . This is no longer required, though the syntax is...
Read more >[Python.NET] Some super basic/possibly stupid question
Then I type: from System import String 5. And I get the error: No module named System. L Which is true, there are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Where did you get this
Clr version 1.0.2? Is it this package?https://pypi.python.org/pypi/clr/1.0.3
If yes, you need to uninstall this clr package to use pythonnet, because both packages have a name clash.
On Thu, Feb 16, 2017, 8:27 PM satanasss notifications@github.com wrote:
You can also try using importlib to import clr from pythonnet with full path provided to clr.pyd.
On Thu, Feb 16, 2017, 8:35 PM Denis Akhiyarov denis.akhiyarov@gmail.com wrote: