Exception when installing packages in IronPython 2.7.7 using Pip - c#

I am trying to install several packages to use it in a C# app via IronPython. However I get the following error when I run ipy -X:Frames -m pip install package_name from the windows console:
Exception:
Traceback (most recent call last):
File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\basecommand.py", line 209, in main
status = self.run(options, args)
File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\commands\install.py", line 299, in run
requirement_set.prepare_files(finder)
File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\req\req_set.py", line 356, in prepare_files
discovered_reqs.extend(self._prepare_file(
File "c:\Program Files (x86)\IronPython 2.7\Lib\contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\utils\logging.py", line 36, in indent_log
yield
ValueError: too many values to unpack
Update: Before the exception I see two warnings. Maybe they have to do with the problem.
C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:1: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
from __future__ import absolute_import
C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\_vendor\requests\packages\urllib3\connection.py:1: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
from __future__ import absolute_import
I can install NLTK via pip in my separate python installation. I tried to reference these packages via sys.path.append() but it doesn't work either. However, I don't think it would be a good solution anyway.

Related

Trying to build the C# wrappers for RDKit with build.bat from bp-kelley/rdkit-csharp

I'm trying to build the C# wrappers for RDKit, but have been struggling to make progress. I've attempted two routes:
n.b. This question is long and unhelpful. Long story short use NuGet (see answer below).
Attempt One
Docs from RDKit /Code/JavaWrappers/csharp_wrapper
The first one is found in https://github.com/rdkit/rdkit.
There are C# wrappers with build instructions in ./Code/JavaWrappers/csharp_wrapper found at: https://github.com/rdkit/rdkit/tree/master/Code/JavaWrappers/csharp_wrapper
My first attempt to compile the wrappers involved manually trying to build these. Following this README: https://github.com/rdkit/rdkit/blob/master/Code/JavaWrappers/csharp_wrapper/README
To build on Windows:
Since cmake doesn't know anything about C#, there's an unfortunate
manual step involved in this.
Make sure that the cmake configuration variable
RDK_BUILD_SWIG_CSHARP_WRAPPER is set to ON.
Run cmake to generate the solution file and open it in Visual
Studio.
Select the option to add an existing project and add
$RDBASE/Code/JavaWrappers/csharp_wrapper/RDKit2DotNet.csproj
Right click on the added project (named RDKit2DotNet) and add a
dependency to RDKFuncs (this is the project that creates the C++
dll that the C# project needs)
Build the RDKit2DotNet project.
Your bin directory
($RDBASE/Code/JavaWrappers/csharp_wrapper/bin/Release if you did a
release build) now contains two DLLs:
- RDKFuncs.dll is the C++ dll containing the RDKit functionality
- RDKit2DotNet.dll contains the C# wrapper. To use the wrappers in your own projects, you should copy both dlls into your project
directory and add a reference to RDKit2DotNet.dll
The directory RDKitCSharpTest contains a sample test project and some
code that makes very basic use of the wrapper functionality.
To get cmake to run I updated the CMakeLists.txt to tell it how to find swig and to set RDK_BUILD_SWIG_CSHARP_WRAPPER ON as follows:
cmake_minimum_required(VERSION 3.14)
project (GraphMolCSharp)
set(SWIG_FOUND TRUE) # This has been added
set(SWIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # This has been added
set(SWIG_EXECUTABLE swig.exe) # This has been added
set(SWIG_VERSION 4.0) # This has been added
find_package (SWIG) # This has been added
include (UseSWIG) # This has been added
include_directories( ${RDKit_ExternalDir} )
SET(RDK_BUILD_SWIG_CSHARP_WRAPPER ON) # This has been added
# find the gmcs executables on non-windows systems:
if(NOT WIN32)
find_program(GMCS_EXE gmcs)
if (NOT GMCS_EXE)
MESSAGE ("gmcs (executable) is not found. Please add it to PATH and rerun cmake.")
MESSAGE(FATAL_ERROR "Cannot find required executable gmcs")
endif (NOT GMCS_EXE)
endif(NOT WIN32)
SET_SOURCE_FILES_PROPERTIES(GraphMolCSharp.i PROPERTIES CPLUSPLUS ON )
# Setup a few variables for environment-specific things
if(WIN32)
ADD_DEFINITIONS("/W3 /wd4716 /bigobj")
SET(PATH_SEP ";")
SET(COPY_CMD xcopy ${COPY_SOURCE} ${COPY_DEST} /Y /I)
else()
SET(PATH_SEP ":")
SET(COPY_CMD cp -p ${COPY_SOURCE} ${COPY_DEST})
endif()
# Coax SWIG into playing nicely with Apple environments
if(APPLE)
SET(CMAKE_SIZEOF_VOID_P 4)
endif(APPLE)
if(CMAKE_SIZEOF_VOID_P MATCHES 4)
SET(CMAKE_SWIG_FLAGS -namespace "GraphMolWrap")
else()
if (WIN32)
SET(CMAKE_SWIG_FLAGS -namespace "GraphMolWrap" "-DSWIGWORDSIZE64" "-DSWIGWIN")
else()
SET(CMAKE_SWIG_FLAGS -namespace "GraphMolWrap" "-DSWIGWORDSIZE64")
endif()
endif()
SET(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_SOURCE_DIR}/swig_csharp )
if(RDK_BUILD_INCHI_SUPPORT)
SET(CMAKE_SWIG_FLAGS "-DRDK_BUILD_INCHI_SUPPORT" ${CMAKE_SWIG_FLAGS} )
endif()
if(RDK_BUILD_AVALON_SUPPORT)
SET(CMAKE_SWIG_FLAGS "-DRDK_BUILD_AVALON_SUPPORT" ${CMAKE_SWIG_FLAGS} )
endif()
FILE(GLOB SWIG_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../*.i")
# we added all source files, now remove the ones that we're not supporting in this build:
if(NOT RDK_BUILD_AVALON_SUPPORT)
LIST(REMOVE_ITEM SWIG_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../AvalonLib.i")
endif()
if(NOT RDK_BUILD_INCHI_SUPPORT)
LIST(REMOVE_ITEM SWIG_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../Inchi.i")
endif()
SET(SWIG_MODULE_RDKFuncs_EXTRA_DEPS ${SWIG_SRC_FILES} )
SWIG_ADD_LIBRARY(RDKFuncs TYPE MODULE LANGUAGE CSharp SOURCES GraphMolCSharp.i )
# it doesnt seem like the threading libs should need to be here, but
# as of Oct 2012 using boost 1.51 under at least ubuntu 12.04 we get a
# link error if they aren't there.
SWIG_LINK_LIBRARIES(RDKFuncs ${RDKit_Wrapper_Libs}
${RDKit_THREAD_LIBS} )
INSTALL(TARGETS RDKFuncs
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR} )
if(NOT WIN32)
# code adapted from the wrapper code for
# GDCM: http://gdcm.svn.sf.net/viewvc/gdcm/trunk/Wrapping/Java/CMakeLists.txt?view=markup
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/RDKit2DotNet.dll
COMMAND ${CMAKE_COMMAND} -E make_directory swig_csharp
## 1. run this custom command only after swig has been run.
COMMAND ${GMCS_EXE} -out:RDKit2DotNet.dll -t:library "swig_csharp/*.cs"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS "${swig_generated_file_fullname}"
)
ADD_CUSTOM_TARGET(RDKFuncsDLL ALL
DEPENDS RDKFuncs ${CMAKE_CURRENT_SOURCE_DIR}/RDKit2DotNet.dll
COMMENT "building mono dll"
)
endif(NOT WIN32)
This creates a lot of new files and one .sln file called GraphMolCSharp.sln.
I was then able to follow the rest of the steps in the README. I opened GraphMolCSharp.sln and added RDKit2DotNet.csproj as a project and added RDKfuncs as a build dependency. But building this gave a lot of errors in Visual Studio, starting with:
Could not copy the file "D:\Desktop\rdkit-master\Code\JavaWrappers\csharp_wrapper\RDKFuncs.dll" because it was not found. RDKit2DotNet
Then a lot of Unable to find x errors.
If anyone can offer some guidance about anything I might have done wrong please let me know.
Attempt Two
The second uses the build.bat found here: https://github.com/bp-kelley/rdkit-csharp
To start I run:
git clone https://github.com/bp-kelley/rdkit-csharp.git
git clone https://github.com/rdkit/rdkit.git
cd rdkit-csharp
Then I have updated the build.bat to use Visual Studio 16 2019 as follows.
Line 95: cmake -G "Visual Studio 16 2019" -A x64 ...
and
Line 111: cmake -G "Visual Studio 16 2019" ...
If someone is able to offer assistance debugging the output below I'd be most grateful.
I have had to cancel the following line:
Downloading: https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to \Desktop\Build\rdkit-csharp\nuget.exe
^CTerminate batch job (Y/N)? n
But have copied nuget.exe into the expected location.
This is most of the output of running build.bat
**PS D:\Desktop\Build> git clone https://github.com/bp-kelley/rdkit-csharp.git
>> git clone https://github.com/rdkit/rdkit.git
>> cd rdkit-csharp
Cloning into 'rdkit-csharp'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 64 (delta 5), reused 7 (delta 3), pack-reused 52
Unpacking objects: 100% (64/64), done.
Cloning into 'rdkit'...
remote: Enumerating objects: 83, done.
remote: Counting objects: 100% (83/83), done.
remote: Compressing objects: 100% (60/60), done.
remote: Total 61097 (delta 34), reused 38 (delta 22), pack-reused 61014
Receiving objects: 100% (61097/61097), 148.64 MiB | 8.96 MiB/s, done.
Resolving deltas: 100% (46291/46291), done.
Checking out files: 100% (3478/3478), done.
PS D:\Desktop\Build\rdkit-csharp> .\build.bat
///////// TOO LONG TO POST TO STACKOVERFLOW CUT LINES /////////
D:\Desktop\Build\rdkit-csharp>call get_nuget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
Downloading: https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to \Desktop\Build\rdkit-csharp\nuget.exe
^CTerminate batch job (Y/N)? n
Running cmake...
Feeds used:
C:\Users\Sarco\.nuget\packages\
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Attempting to gather dependency information for package 'boost-vc140.1.69.0' with respect to project 'D:\Desktop\Build\rdkit-csharp\Nuget.Local', targeting 'Any,Version=v0.0'
///////// TOO LONG TO POST TO STACKOVERFLOW CUT LINES /////////
Build started 11/05/2019 09:36:17.
1>Project "D:\Desktop\Build\rdkit-csharp\build64\ALL_BUILD.vcxproj" on node 1 (Build target(s)).
1>D:\Desktop\Build\rdkit-csharp\build64\ALL_BUILD.vcxproj(32,3): error MSB4019: The imported project "D:\Microsoft
.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the fi
le exists on disk.
1>Done Building Project "D:\Desktop\Build\rdkit-csharp\build64\ALL_BUILD.vcxproj" (Build target(s)) -- FAILED.
Build FAILED.
"D:\Desktop\Build\rdkit-csharp\build64\ALL_BUILD.vcxproj" (Build target) (1) ->
D:\Desktop\Build\rdkit-csharp\build64\ALL_BUILD.vcxproj(32,3): error MSB4019: The imported project "D:\Microso
ft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the
file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.14
D:\Desktop\Build\rdkit-csharp\build64>copy Code\JavaWrappers\csharp_wrapper\Release\RDKFuncs.dll Code\JavaWrappers\csharp_wrapper
The system cannot find the path specified.
D:\Desktop\Build\rdkit-csharp\build64>copy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj Code\JavaWrappers\csharp_wrapper
1 file(s) copied.
D:\Desktop\Build\rdkit-csharp\build64>robocopy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp Code\JavaWrappers\csharp_wrapper\swig_csharp /E
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : 11 May 2019 09:36:17
Source : D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
Dest : D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\swig_csharp\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
2019/05/11 09:36:17 ERROR 2 (0x00000002) Accessing Source Directory D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
The system cannot find the file specified.
D:\Desktop\Build\rdkit-csharp\build64>copy D:\Desktop\Build\rdkit-csharp\\RDKit.cs Code\JavaWrappers\csharp_wrapper\swig_csharp\RDKit.cs
The system cannot find the path specified.
0 file(s) copied.
D:\Desktop\Build\rdkit-csharp\build64>msbuild "Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" /m /p:Configuration=Release /maxcpucount:4 /t:Build /p:Platform=AnyCPU
Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/05/2019 09:36:18.
1>Project "D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" on node 1 (
Build target(s)).
1>PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect t
o the input files.
CoreCompile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prom
pt /warn:4 /define:TRACE /highentropyva- /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Fra
mework\.NETFramework\v4.0\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micros
oft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microso
ft\Framework\.NETFramework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micro
soft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Refere
nce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Refe
rence Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference:"C:\Program Files (x86)\Referen
ce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Refere
nce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /opti
mize+ /out:obj\Release\RDKit2DotNet.dll /target:library /utf8output
1>CSC : warning CS2008: No source files specified [D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_
wrapper\RDKit2DotNet.csproj]
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3713,5): error MSB3030: Could not copy th
e file "D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKFuncs.dll" because it was not
found. [D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj]
1>Done Building Project "D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.cspro
j" (Build target(s)) -- FAILED.
Build FAILED.
"D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" (Build target) (1)
->
(CoreCompile target) ->
CSC : warning CS2008: No source files specified [D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\cshar
p_wrapper\RDKit2DotNet.csproj]
"D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" (Build target) (1)
->
(_CopyOutOfDateSourceItemsToOutputDirectoryAlways target) ->
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3713,5): error MSB3030: Could not copy
the file "D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKFuncs.dll" because it was no
t found. [D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.63
///////// TOO LONG TO POST TO STACKOVERFLOW CUT LINES /////////
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found Catch2 source in D:/Desktop/Build/rdkit/External/catch/catch
CATCH: D:/Desktop/Build/rdkit/External/catch/catch/single_include
-- Could NOT find InChI in system locations (missing: INCHI_LIBRARY INCHI_INCLUDE_DIR)
CUSTOM_INCHI_PATH = D:/Desktop/Build/rdkit/External/INCHI-API
-- Found InChI software locally
-- Boost version: 1.69.0
-- Looking for pthread.h
///////// TOO LONG TO POST TO STACKOVERFLOW CUT LINES /////////
in D:/Desktop/Build/rdkit/External/CoordGen/maeparser
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
Unable to find the requested Boost libraries.
Boost version: 1.69.0
Boost include path:
D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include
Could not find the following Boost libraries:
boost_system
boost_iostreams
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
External/CoordGen/CMakeLists.txt:39 (find_package)
-- coordgen include dir set as coordgen_INCLUDE_DIRS-NOTFOUND
-- coordgen libraries set as 'coordgen_LIBRARIES-NOTFOUND'
-- coordgen templates file set as 'coordgen_TEMPLATE_FILE-NOTFOUND'
-- Could NOT find coordgen (missing: coordgen_INCLUDE_DIRS coordgen_LIBRARIES coordgen_TEMPLATE_FILE)
-- Found coordgenlibs source in D:/Desktop/Build/rdkit/External/CoordGen/coordgen
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
Unable to find the requested Boost libraries.
Boost version: 1.69.0
Boost include path:
D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include
Could not find the following Boost libraries:
boost_system
boost_iostreams
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
Code/RDStreams/CMakeLists.txt:4 (find_package)
-- Could NOT find Boost
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
Unable to find the requested Boost libraries.
Boost version: 1.69.0
Boost include path:
D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include
Could not find the following Boost libraries:
boost_system
boost_iostreams
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
Code/GraphMol/FileParsers/CMakeLists.txt:7 (find_package)
-- Could NOT find Boost
== Making EnumerateLibrary without boost Serialization support
== Making FilterCatalog without boost Serialization support
-- Found PythonInterp: D:/Program Files/Python36-32/python.exe (found version "3.6.3")
== Updating Filters.cpp from pains file
== Done updating pains files
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found Cairo: D:/Desktop/Build/rdkit-csharp/Nuget.Local/cairo.1.12.18.0/build/native/include
== Making SubstructLibrary without boost Serialization support
-- Found RapidJSON source in D:/Desktop/Build/rdkit/External
-- Found SWIG: C:/swig/swig.exe (found version "4.0.0")
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
Unable to find the requested Boost libraries.
Boost version: 1.69.0
Boost include path:
D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include
Could not find the following Boost libraries:
boost_system
boost_iostreams
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
Code/JavaWrappers/CMakeLists.txt:43 (find_package)
-- Could NOT find Boost
SUFFIX:
JAVA_LIBS: AvalonLib;avalon_clib;RDInchiLib;Inchi;RGroupDecomposition;SubstructLibrary;MolStandardize;FilterCatalog;Catalogs;FMCS;MolDraw2D;FileParsers;SmilesParse;Depictor;SubstructMatch;ChemReactions;Fingerprints;ChemTransforms;Subgraphs;GraphMol;DataStructs;Trajectory;Descriptors;PartialCharges;MolTransforms;DistGeomHelpers;DistGeometry;ForceFieldHelpers;ForceField;EigenSolvers;Optimizer;MolAlign;Alignment;SimDivPickers;RDGeometryLib;RDStreams;RDGeneral
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.14/Modules/UseSWIG.cmake:600 (message):
Policy CMP0078 is not set: UseSWIG generates standard target names. Run
"cmake --help-policy CMP0078" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
Code/JavaWrappers/csharp_wrapper/CMakeLists.txt:63 (SWIG_ADD_LIBRARY)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.14/Modules/UseSWIG.cmake:460 (message):
Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
flag. Run "cmake --help-policy CMP0086" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
D:/Program Files/CMake/share/cmake-3.14/Modules/UseSWIG.cmake:695 (SWIG_ADD_SOURCE_TO_MODULE)
Code/JavaWrappers/csharp_wrapper/CMakeLists.txt:63 (SWIG_ADD_LIBRARY)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "D:/Desktop/Build/rdkit-csharp/build32/CMakeFiles/CMakeOutput.log".
See also "D:/Desktop/Build/rdkit-csharp/build32/CMakeFiles/CMakeError.log".
D:\Desktop\Build\rdkit-csharp\build32>msbuild "ALL_BUILD.vcxproj" /m /p:PlatformTarget=x86 /p:Configuration=Release /maxcpucount:4 /t:Build
Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj
D:\Desktop\Build\rdkit-csharp\build32>copy Code\JavaWrappers\csharp_wrapper\Release\RDKFuncs.dll Code\JavaWrappers\csharp_wrapper
The system cannot find the path specified.
D:\Desktop\Build\rdkit-csharp\build32>copy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj Code\JavaWrappers\csharp_wrapper
1 file(s) copied.
D:\Desktop\Build\rdkit-csharp\build32>robocopy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp Code\JavaWrappers\csharp_wrapper\swig_csharp /E
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : 11 May 2019 09:36:36
Source : D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
Dest : D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\swig_csharp\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
2019/05/11 09:36:36 ERROR 2 (0x00000002) Accessing Source Directory D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
The system cannot find the file specified.
D:\Desktop\Build\rdkit-csharp\build32>copy D:\Desktop\Build\rdkit-csharp\\RDKit.cs Code\JavaWrappers\csharp_wrapper\swig_csharp\RDKit.cs
The system cannot find the path specified.
0 file(s) copied.
D:\Desktop\Build\rdkit-csharp\build32>msbuild "Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" /m /p:Configuration=Release /maxcpucount:4 /t:Build /p:Platform=AnyCPU
Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/05/2019 09:36:36.
1>Project "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" on node 1 (
Build target(s)).
1>PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect t
o the input files.
CoreCompile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prom
pt /warn:4 /define:TRACE /highentropyva- /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Fra
mework\.NETFramework\v4.0\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micros
oft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microso
ft\Framework\.NETFramework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micro
soft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Refere
nce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Refe
rence Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference:"C:\Program Files (x86)\Referen
ce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Refere
nce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /opti
mize+ /out:obj\Release\RDKit2DotNet.dll /target:library /utf8output
1>CSC : warning CS2008: No source files specified [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_
wrapper\RDKit2DotNet.csproj]
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3713,5): error MSB3030: Could not copy th
e file "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKFuncs.dll" because it was not
found. [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj]
1>Done Building Project "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.cspro
j" (Build target(s)) -- FAILED.
Build FAILED.
"D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" (Build target) (1)
->
(CoreCompile target) ->
CSC : warning CS2008: No source files specified [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\cshar
p_wrapper\RDKit2DotNet.csproj]
"D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" (Build target) (1)
->
(_CopyOutOfDateSourceItemsToOutputDirectoryAlways target) ->
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3713,5): error MSB3030: Could not copy
the file "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKFuncs.dll" because it was no
t found. [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj]
1 Warning(s)**
Never did manage manually compile the RDKit DotNet Wrapper.
However I did find a NuGet package for an old version that did what I need it to:
https://www.nuget.org/packages/RDKit2DotNet/2017.9.1-alpha1
Install-Package RDKit2DotNet -Version 2017.9.1-alpha1
Update
There is now a newer version which works perfectly:
https://www.nuget.org/packages/RDKit.DotNetWrap/
Install-Package RDKit.DotNetWrap -Version 0.2019033.1

Install numpy for IronPython

I wanted to run some code in IronPython using c#. In this code I needed to use numpy. So I tried to install it using the command below:
ipy -X:Frames -m pip install -U numpy
Unfortunately, I get an error and a return message telling me it was a unsuccessful installation. The error message is bellow:
Using cached https://files.pythonhosted.org/packages/3a/20/c81632328b1a4e1db65f45c0a1350a9c5341fd4bbb8ea66cdd98da56fe2e/numpy-1.15.0.zip
Installing collected packages: numpy
Running setup.py install for numpy ... error
Complete output from command "C:\Program Files\IronPython 2.7\ipy.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\mbhamida\\appdata\\local\\temp\\pip-build-t61kxu\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\mbhamida\appdata\local\temp\pip-y91bz0-record\install-record.txt --single-version-externally-managed --compile:
Running from numpy source directory.
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install numpy` (last NumPy release on PyPi)
C:\Program Files\IronPython 2.7\Lib\distutils\dist.py:1: UserWarning: Unknown distribution option: 'python_requires'
"""distutils.dist
blas_opt_info:
blas_mkl_info:
customize MSVCCompiler
libraries mkl_rt not found in ['C:\\Program Files\\IronPython 2.7\\lib']
NOT AVAILABLE
blis_info:
customize MSVCCompiler
libraries blis not found in ['C:\\Program Files\\IronPython 2.7\\lib']
NOT AVAILABLE
openblas_info:
customize MSVCCompiler
customize MSVCCompiler
libraries openblas not found in ['C:\\Program Files\\IronPython 2.7\\lib']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\setup.py", line 410, in <module>
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\core.py", line 135, in setup
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 625, in get_info
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 433, in get_info
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 625, in get_info
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 1758, in calc_info
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\fcompiler\__init__.py", line 61, in <module>
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\setup.py", line 402, in setup_package
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\setup.py", line 167, in configuration
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 1032, in add_subpackage
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 998, in get_subpackage
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 940, in _get_configuration_from_setup_py
File "numpy\setup.py", line 10, in configuration
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 1032, in add_subpackage
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 998, in get_subpackage
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\misc_util.py", line 940, in _get_configuration_from_setup_py
File "numpy\core\setup.py", line 832, in configuration
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 433, in get_info
File "c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\numpy\distutils\system_info.py", line 1621, in calc_info
TypeError: a new-style class can't have only classic bases
----------------------------------------
Command ""C:\Program Files\IronPython 2.7\ipy.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\mbhamida\\appdata\\local\\temp\\pip-build-t61kxu\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\mbhamida\appdata\local\temp\pip-y91bz0-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\mbhamida\appdata\local\temp\pip-build-t61kxu\numpy\
I searched a lot about a solution, but I guess it is a very common problem.
Ps: I face the same problem with many other packages.
What can be the solution?
Python is first and foremost a language and has a default implementation in C: CPython. IronPython is another implementation of the language, based on .NET. As such, it implements the default core language and most of the standard library.
Some Python packages available through PIP are pure Python and rely on elements supported by IronPython. Some other modules are, however, specific to the implementation. In particular, numpy uses native C code, which is supported by CPython but not by IronPython. More info on the IronPython issue tracker: https://github.com/IronLanguages/ironpython2/issues/
For it to work, numpy would have to offer compatibility with .NET. I have seen a .NET refactor of numpy, but never got it working.
A solution for your problem? Avoid mixing numpy and .NET. If you find a way to make it work, though, I'm interested.
[Edit:] You might want to have a look at this answer on how to install numpy: https://stackoverflow.com/a/51900761/6690989

Installing PsychoPy as a third party package in Ironpython

I've been using IronPython to use functions in a C# .dll class library. I have also been using another set of packages called Psychopy. However, IronPython does not recognize Pyschopy packages. I tried placing a .pth file that said the following in IronPython's site-packages folder: C:/Program Files (x86)/PsychoPy2/Lib/site-packages/PsychoPy-1.80.03-py2.7.egg
I then changed the sys.prefix, sys.exec_prefix variables in site.py to "C:/Program Files (x86)/IronPython 2.7". Then, I went to the command line and in the ironpython shell, I tried to import psychopy. I received the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in '<'module'>'
File "C:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.80.03-py2.7.egg\psychopy\__init__.py", line 33, in '<'module'>'"
File "C:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.80.03-py2.7.egg\psychopy\preferences\__init__.py", line 5, in '<'module'>'
File "C:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.80.03-py2.7.egg\psychopy\preferences\preferences.py", line 186, in '<'module'>'
File "C:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.80.03-py2.7.egg\psychopy\preferences\preferences.py", line 32, in __init__
File "C:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.80.03-py2.7.egg\psychopy\preferences\preferences.py", line 95, in getPaths
File "C:\Program Files (x86)\IronPython 2.7\Lib\os.py", line 423, in __getitem__
KeyError: HOME
I was wondering if anyone know how to install thrid party packages in Ironpython.
I'm guessing that you can fix this by adding HOME as an environment variable (System properties>Advanced) and pointing it to your home folder.
I'm not sure why that step is needed for IronPython but not for regular C python - I guess C Python creates it if it isn't found?
I also don't know what else will go wrong in PsychoPy; I've never used IronPython
Jon

How do I correctly install the Facebook SDK Unity plugin?

My current process is approximatly:
I start with a Disk image of Window 7 x64 with only:
Unity 4.3.3f1, Located 'C:\Program Files(x86)\Unity'.
The adt-bundle-windows-x86-20131030. 'C:\Users\Will\adt...'.
The Java 32bit runtime 1.7.0_51-b13, 'C:\Program Files(x86)\Java'.
'C:\Program Files(x86)\Java\jr7\bin;' is manually added to my 'Path' Environment Varible.
As it is I can cleanly deploy Android projects, however I want to use the official Facebook SDK plugin. At this point on my first attempt to install the plugin I dropped it into a project as per the official 'Getting Started' tutorial and this is where I get a bit lost. Even though there is no mention of it in the 'Getting Started' tutorial I find that OpenSSL is a dependancy of the SDK.
So I install the OpenSSL binary 'Win32OpenSSL-1_0_1f' to 'C:\Program Files(x86)\OpenSSL-Win32' and when the plugin still can't find it I add 'C:\Program Files(x86)\OpenSSL-Win32\bin;' to my 'Path' Environment Variable.
At this point The plugin's 'Debug Key Hash' starts working and I naievly assume that everything is correct, However; When I attempt to deploy a build I recieve the following error:
Error building Player: Win32Exception: ApplicationName='C:\Program Files (x86)\Java\jre7\bin\javac.exe', CommandLine='-bootclasspath "C:/Users/Will/adt-bundle-windows-x86-20131030/adt-bundle-windows-x86-20131030/sdk/platforms/android-19\android.jar" -d "C:\Users\Will\Documents\Unity Projects\test\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding ascii "com\DefaultCompany\test\R.java" "com\facebook\android\R.java"', CurrentDirectory='C:\Users\Will\Documents\Unity Projects\test\Temp\StagingArea\gen'
and the build process is halted.
Could anyone help explain where I am going wrong and to get this plugin to behave?
I had the exact same issue - I've solved it by deleting the JAVA_HOME environment variable that pointed to a directory containing JRE (instead of JDK). You also seem to only have JRE installed and the javac.exe file is not part of that package. Alternatively, point JAVA_HOME to the directory on your machine that does have JDK (and javac.exe) installed.

MSBuild Packge target and WebPublishTargetsVersion property

Hey there I could really use a guru on msbuild.
Ultimate goal: Build web deployment packages with TeamCity
I'm trying to call the Package target in TeamCity on my build server and it fails as path: Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.5 doesn't exist. 10.5 doesn't exist on my dev laptop either, I am using VS 2012, yet I can call MSbuild package target on the command line of my laptop with no problem.
I could make a copy of Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 that does exist on the build server and rename it 10.5, but this just feels wrong.
Any pointers gratefully received.
EDIIT
For now I have just:
created the path: "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.5"
Copied contents of V10.0 into it.
Copied "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\web\Microsoft.WebSite.Publishing.targets" into it.
It's a case of getting the VisualStudioVersion right, override it on the command line and all is good.
C:\>msbuild web_site.publishproj /T:Package /P:Configuration=Release;PackageLocation=C:\packages;VisualStudioVersion=11.0

Categories