Hi 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
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')
print('TODO')
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:
Hi 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 SysteminportError: 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
http://stackoverflow.com/help/mcve
this will help us understand the issue.print('TODO')
If there was a crash, please include the traceback here.
print('TODO')
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pythonnet/pythonnet/issues/388, or mute the thread
https://github.com/notifications/unsubscribe-auth/AHgZ5aYSfKUmewxvv-Jj6iizDFPiRW1Sks5rdQWjgaJpZM4MDzI9
.
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:
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:
Hi 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 SysteminportError: 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
http://stackoverflow.com/help/mcve
this will help us understand the issue.print('TODO')
If there was a crash, please include the traceback here.
print('TODO')
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pythonnet/pythonnet/issues/388, or mute the thread
https://github.com/notifications/unsubscribe-auth/AHgZ5aYSfKUmewxvv-Jj6iizDFPiRW1Sks5rdQWjgaJpZM4MDzI9
.
Wow thanks for the quick answer ! Indeed getting rid of clr and reinstalling pyhtonnet fixed the stuff.
Many thanks guys !
In retrospective we should have registered that package name in PyPi
I think there is a way to "complain" to pypi members, so that this clashing is resolved.
This clr package is only about one month old.
But let's wait over the weekends, if the author responds.
I've pinged him again to get to a decision: https://github.com/lmittmann/clr/issues/1
In case he does not want to give up the name we should:
pythonnet installed via pipIn case he does:
clr name on pypi and essentially alias it to pythonnet, for example by putting a package there that prints a warning and depends on pythonnet@denfromufa @vmuriart I have added you as owners of the clr package on PyPI. I don't have the time to finish the work there right now, so here's the TODO list :)
style and that the "real" name of the Python.NET package is pythonnetsetup.py) within our git-repo that only depends on pythonnetclr package and push our alias-packageWe may as well reserve Python.net package name on pypi.
I just got this error and found out it was due to having multiple Python installations, including pythonnet package install in each.
where.exe python to find where it's installed. pip, like this:pip list
pip3.8.exe list
(depending on what you found in (1).)
The version I am using, is conda so scripts installed with conda and using import clr, fails with:
ModuleNotFoundError: No module named 'clr'
when ran from command line.
I don't know how to fix this.
However, running script in it's own home directory (elsewhere) seem to work. Very weird!
Most helpful comment
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: