I cannot import clr unless the 3 files (nPython, Python.Runtime & clr) are placed in the directory C:\Python27.
If placed anywhere else I get the following error:
"dynamic module not initialized properly"
I'm on CPython 2.7.5, Win7 32bit.
I have .NET Framework 4.5 installed.
If I try to build the pythonnet solution in VS2012 I get the following error:
Error 2 The target "RGieseckeDllExport" does not exist in the project. C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\clrmodule\clrmodule.csproj 124 29 clrmodule
If I try to run python setup.py install I get:
C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet>python se
tup.py install
running install
running bdist_egg
running egg_info
writing pythonnet.egg-info\PKG-INFO
writing top-level names to pythonnet.egg-info\top_level.txt
writing dependency_links to pythonnet.egg-info\dependency_links.txt
reading manifest file 'pythonnet.egg-info\SOURCES.txt'
writing manifest file 'pythonnet.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_ext
Microsoft (R) Build Engine version 4.0.30319.18408
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) Build Engine version 4.0.30319.18408
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.
assemblymanager.cs(188,37): warning CS0168: The variable 'e' is declared but ne
ver used [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonne
t\src\runtime\Python.Runtime.csproj]
Python.Runtime -> C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develo
p\pythonnet\src\runtime\bin\x86\ReleaseWin\Python.Runtime.dll
eventtest.cs(44,48): warning CS0067: The event 'Python.Test.EventTest.InternalS
taticEvent' is never used [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet
-develop\pythonnet\src\testing\Python.Test.csproj]
eventtest.cs(46,47): warning CS0067: The event 'Python.Test.EventTest.PrivateSt
aticEvent' is never used [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-
develop\pythonnet\src\testing\Python.Test.csproj]
eventtest.cs(52,41): warning CS0067: The event 'Python.Test.EventTest.InternalE
vent' is never used [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-devel
op\pythonnet\src\testing\Python.Test.csproj]
eventtest.cs(54,40): warning CS0067: The event 'Python.Test.EventTest.PrivateEv
ent' is never used [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develo
p\pythonnet\src\testing\Python.Test.csproj]
Python.Test -> C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\p
ythonnet\src\testing\bin\x86\ReleaseWin\Python.Test.dll
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5):
warning MSB3245: Could not resolve this reference. Could not locate the assemb
ly "nunit.framework". Check to make sure the assembly exists on disk. If this r
eference is required by your code, you may get compilation errors. [C:\Users\ma
rnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests\Pyt
hon.EmbeddingTest.csproj]
pyimport.cs(4,7): error CS0246: The type or namespace name 'NUnit' could not be
found (are you missing a using directive or an assembly reference?) [C:\Users
marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests\P
ython.EmbeddingTest.csproj]
pyiter.cs(3,7): error CS0246: The type or namespace name 'NUnit' could not be f
ound (are you missing a using directive or an assembly reference?) [C:\Users\ma
rnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests\Pyt
hon.EmbeddingTest.csproj]
pyobject.cs(2,7): error CS0246: The type or namespace name 'NUnit' could not be
found (are you missing a using directive or an assembly reference?) [C:\Users
marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests\P
ython.EmbeddingTest.csproj]
pythonexception.cs(2,7): error CS0246: The type or namespace name 'NUnit' could
not be found (are you missing a using directive or an assembly reference?) [C:
\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_
tests\Python.EmbeddingTest.csproj]
pyimport.cs(14,10): error CS0118: 'Python.EmbeddingTest.PyImportTest.SetUp()' i
s a 'method' but is used like a 'type' [C:\Users\marnj\Downloads\pythonnet-deve
lop\pythonnet-develop\pythonnet\src\embed_tests\Python.EmbeddingTest.csproj]
pyimport.cs(14,10): error CS0246: The type or namespace name 'SetUpAttribute' c
ould not be found (are you missing a using directive or an assembly reference?)
[C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\em
bed_tests\Python.EmbeddingTest.csproj]
pyimport.cs(48,10): error CS0118: 'Python.EmbeddingTest.PyImportTest.TearDown()
' is a 'method' but is used like a 'type' [C:\Users\marnj\Downloads\pythonnet-d
evelop\pythonnet-develop\pythonnet\src\embed_tests\Python.EmbeddingTest.csproj]
pyimport.cs(48,10): error CS0246: The type or namespace name 'TearDownAttribute
' could not be found (are you missing a using directive or an assembly referenc
e?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src
\embed_tests\Python.EmbeddingTest.csproj]
pyimport.cs(67,10): error CS0246: The type or namespace name 'Test' could not b
e found (are you missing a using directive or an assembly reference?) [C:\Users
\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests
Python.EmbeddingTest.csproj]
pyimport.cs(67,10): error CS0246: The type or namespace name 'TestAttribute' co
uld not be found (are you missing a using directive or an assembly reference?)
[C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\emb
ed_tests\Python.EmbeddingTest.csproj]
pyimport.cs(9,6): error CS0246: The type or namespace name 'TestFixture' could
not be found (are you missing a using directive or an assembly reference?) [C:
Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_t
ests\Python.EmbeddingTest.csproj]
pyimport.cs(9,6): error CS0246: The type or namespace name 'TestFixtureAttribut
e' could not be found (are you missing a using directive or an assembly referen
ce?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\sr
c\embed_tests\Python.EmbeddingTest.csproj]
pyiter.cs(13,10): error CS0118: 'Python.EmbeddingTest.PyIterTest.SetUp()' is a
'method' but is used like a 'type' [C:\Users\marnj\Downloads\pythonnet-develop
pythonnet-develop\pythonnet\src\embed_tests\Python.EmbeddingTest.csproj]
pyiter.cs(13,10): error CS0246: The type or namespace name 'SetUpAttribute' cou
ld not be found (are you missing a using directive or an assembly reference?) [
C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embe
d_tests\Python.EmbeddingTest.csproj]
pyiter.cs(20,10): error CS0118: 'Python.EmbeddingTest.PyIterTest.TearDown()' is
a 'method' but is used like a 'type' [C:\Users\marnj\Downloads\pythonnet-devel
op\pythonnet-develop\pythonnet\src\embed_tests\Python.EmbeddingTest.csproj]
pyiter.cs(20,10): error CS0246: The type or namespace name 'TearDownAttribute'
could not be found (are you missing a using directive or an assembly reference?
) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\e
mbed_tests\Python.EmbeddingTest.csproj]
pyiter.cs(27,10): error CS0246: The type or namespace name 'Test' could not be
found (are you missing a using directive or an assembly reference?) [C:\Users\m
arnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests\Py
thon.EmbeddingTest.csproj]
pyiter.cs(27,10): error CS0246: The type or namespace name 'TestAttribute' coul
d not be found (are you missing a using directive or an assembly reference?) [C
:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed
_tests\Python.EmbeddingTest.csproj]
pyiter.cs(8,6): error CS0246: The type or namespace name 'TestFixture' could no
t be found (are you missing a using directive or an assembly reference?) [C:\Us
ers\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tes
ts\Python.EmbeddingTest.csproj]
pyiter.cs(8,6): error CS0246: The type or namespace name 'TestFixtureAttribute'
could not be found (are you missing a using directive or an assembly reference
?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src
embed_tests\Python.EmbeddingTest.csproj]
pyobject.cs(12,10): error CS0118: 'Python.EmbeddingTest.PyObjectTest.SetUp()' i
s a 'method' but is used like a 'type' [C:\Users\marnj\Downloads\pythonnet-deve
lop\pythonnet-develop\pythonnet\src\embed_tests\Python.EmbeddingTest.csproj]
pyobject.cs(12,10): error CS0246: The type or namespace name 'SetUpAttribute' c
ould not be found (are you missing a using directive or an assembly reference?)
[C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\em
bed_tests\Python.EmbeddingTest.csproj]
pyobject.cs(19,10): error CS0118: 'Python.EmbeddingTest.PyObjectTest.TearDown()
' is a 'method' but is used like a 'type' [C:\Users\marnj\Downloads\pythonnet-d
evelop\pythonnet-develop\pythonnet\src\embed_tests\Python.EmbeddingTest.csproj]
pyobject.cs(19,10): error CS0246: The type or namespace name 'TearDownAttribute
' could not be found (are you missing a using directive or an assembly referenc
e?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src
\embed_tests\Python.EmbeddingTest.csproj]
pyobject.cs(26,10): error CS0246: The type or namespace name 'Test' could not b
e found (are you missing a using directive or an assembly reference?) [C:\Users
\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests
Python.EmbeddingTest.csproj]
pyobject.cs(26,10): error CS0246: The type or namespace name 'TestAttribute' co
uld not be found (are you missing a using directive or an assembly reference?)
[C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\emb
ed_tests\Python.EmbeddingTest.csproj]
pyobject.cs(7,6): error CS0246: The type or namespace name 'TestFixture' could
not be found (are you missing a using directive or an assembly reference?) [C:
Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_t
ests\Python.EmbeddingTest.csproj]
pyobject.cs(7,6): error CS0246: The type or namespace name 'TestFixtureAttribut
e' could not be found (are you missing a using directive or an assembly referen
ce?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\sr
c\embed_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(12,10): error CS0118: 'Python.EmbeddingTest.PythonExceptionT
est.SetUp()' is a 'method' but is used like a 'type' [C:\Users\marnj\Downloads
pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests\Python.EmbeddingT
est.csproj]
pythonexception.cs(12,10): error CS0246: The type or namespace name 'SetUpAttri
bute' could not be found (are you missing a using directive or an assembly refe
rence?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet
\src\embed_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(19,10): error CS0118: 'Python.EmbeddingTest.PythonExceptionT
est.TearDown()' is a 'method' but is used like a 'type' [C:\Users\marnj\Downloa
ds\pythonnet-develop\pythonnet-develop\pythonnet\src\embed_tests\Python.Embeddi
ngTest.csproj]
pythonexception.cs(19,10): error CS0246: The type or namespace name 'TearDownAt
tribute' could not be found (are you missing a using directive or an assembly r
eference?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\python
net\src\embed_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(26,10): error CS0246: The type or namespace name 'Test' coul
d not be found (are you missing a using directive or an assembly reference?) [C
:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed
_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(26,10): error CS0246: The type or namespace name 'TestAttrib
ute' could not be found (are you missing a using directive or an assembly refer
ence?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet
src\embed_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(40,10): error CS0246: The type or namespace name 'Test' coul
d not be found (are you missing a using directive or an assembly reference?) [C
:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\embed
_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(40,10): error CS0246: The type or namespace name 'TestAttrib
ute' could not be found (are you missing a using directive or an assembly refer
ence?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet
src\embed_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(7,6): error CS0246: The type or namespace name 'TestFixture'
could not be found (are you missing a using directive or an assembly reference
?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src
embed_tests\Python.EmbeddingTest.csproj]
pythonexception.cs(7,6): error CS0246: The type or namespace name 'TestFixtureA
ttribute' could not be found (are you missing a using directive or an assembly
reference?) [C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pytho
nnet\src\embed_tests\Python.EmbeddingTest.csproj]
assemblyinfo.cs(24,34): warning CS0618: 'System.Security.Permissions.SecurityAc
tion.RequestMinimum' is obsolete: 'Assembly level declarative security is obsol
ete and is no longer enforced by the CLR by default. See http://go.microsoft.co
m/fwlink/?LinkID=155570 for more information.' [C:\Users\marnj\Downloads\python
net-develop\pythonnet-develop\pythonnet\src\console\Console.csproj]
Console -> C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pytho
nnet\src\console\bin\x86\Release\nPython.exe
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5):
warning MSB3245: Could not resolve this reference. Could not locate the assemb
ly "RGiesecke.DllExport.Metadata". Check to make sure the assembly exists on di
sk. If this reference is required by your code, you may get compilation errors.
[C:\Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\cl
rmodule\clrmodule.csproj]
ClrModule.cs(42,6): error CS0246: The type or namespace name 'RGiesecke' could
not be found (are you missing a using directive or an assembly reference?) [C:
Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\clrmodu
le\clrmodule.csproj]
ClrModule.cs(42,6): error CS0246: The type or namespace name 'RGiesecke' could
not be found (are you missing a using directive or an assembly reference?) [C:
Users\marnj\Downloads\pythonnet-develop\pythonnet-develop\pythonnet\src\clrmodu
le\clrmodule.csproj]
Traceback (most recent call last):
File "setup.py", line 196, in
"install_lib" : PythonNET_InstallLib
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 73, i
n run
self.do_egg_install()
File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 93, i
n do_egg_install
self.run_command('bdist_egg')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\bdist_egg.py", line 179
, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\Python27\lib\site-packages\setuptools\command\bdist_egg.py", line 166
, in call_command
self.run_command(cmdname)
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\install_lib.py", line 92, in run
self.build()
File "C:\Python27\lib\distutils\command\install_lib.py", line 111, in build
self.run_command('build_ext')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Python27\lib\distutils\command\build_ext.py", line 448, in build_exte
nsions
self.build_extension(ext)
File "setup.py", line 78, in build_extension
check_call(" ".join(cmd) + " /t:Build", shell=True)
File "C:\Python27\lib\subprocess.py", line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'C:\windows\Microsoft.NET\Framework\v4.0.
30319\msbuild.exe pythonnet.sln /p:Configuration=ReleaseWin /p:Platform=x86 /p:D
efineConstants="PYTHON27;UCS2" /p:PythonBuildDir=C:\Users\marnj\Downloads\python
net-develop\pythonnet-develop\pythonnet\build\lib.win32-2.7 /p:NoNuGet=true /ver
bosity:minimal /t:Build' returned non-zero exit status 1