Code Monkey home page Code Monkey logo

pyogmaneo2's People

Contributors

222464 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyogmaneo2's Issues

self.prog never declared

The variable self.prog is never declared in EnvRunner.py, which is used at line 91. This is a problem when EnvRunner is applied to an enviroment with an image obervable.

Changes to CMakeLists.txt to be compatible with Miniconda installed on macOS

The Mac has multiple installs of Python and the technique to Find it in CMakeLists does not work. There are newer versions of Python finder which correctly finds the location i.e.; Python Python2 Python3.

[See the last answer ... ](https://stackoverflow.com/questions/29245558/how-to-link-with-python3-libs-with-cmake see last answer)

See the reference manual at ...

In the section Find Python page

Old Code

# Find Python package
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIR})

# Setup SWIG bindings
target_link_libraries(pyogmaneo PyOgmaNeoCpp ${PYTHON_LIBRARIES})

New Code

# Find Python package
find_package(Python COMPONENTS Interpreter Development REQUIRED)
include_directories(${Python_INCLUDE_DIRS})

# Setup SWIG bindings
target_link_libraries(pyogmaneo PyOgmaNeoCpp ${Python_LIBRARIES})

There remains a small issue with deploying to the correct Python directory. But that is easy to resolve.

Could NOT find OgmaNeo

Hi,

I am trying to install PyOgmaNeo2 on ubuntu 18.04 but I am running into to the following error message:

python3 setup.py install --user
running install
running build_ext
creating /home/aktersnurra/Documents/Packages/PyOgmaNeo2/build
creating /home/aktersnurra/Documents/Packages/PyOgmaNeo2/build/temp.linux-x86_64-3.6
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_BUILD_TYPE not set, setting it to Debug
-- Build type: Debug
Python target version: 3
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OgmaNeo (missing: OGMANEO_LIBRARY OGMANEO_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
CMake/FindOgmaNeo.cmake:36 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:34 (find_package)

NB: yes, I use the -DBUILD_SHARED_LIBS=ON flag when building the OgmaNeo2. I also tried linking the paths via my .bashrc file.

Cheers,

Gustaf

Error MSB4006

Got a "Error MSB4006: There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences"" when compiling on Windows after the latest changes to CMakeLists.txt. An easy fix was to revert the changes on CMakeLists.txt.

installation failed in Ubuntu LTS 20.04?

Hi Erik
I try today to install the lastest version of OgmaNeo2 and then PyOgmaNeo2
python3 setup.py install --user

if I compiled OgmaNeo2 in share mode, I got the error:
running install
running build_ext
CMAKE_BUILD_TYPE not set, setting it to Release
-- Build type: Release
Python target version: 3
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/UseSWIG.cmake:486 (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):
/usr/share/cmake-3.18/Modules/UseSWIG.cmake:736 (SWIG_ADD_SOURCE_TO_MODULE)
CMakeLists.txt:100 (swig_add_library)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/binh/experiments/RL/OgmaNeo2020/PyOgmaNeo2/build/temp.linux-x86_64-3.8
cmake --build . --config Release
[ 57%] Built target PyOgmaNeoCpp
[ 71%] Built target pyogmaneo_swig_compilation
make[2]: *** No rule to make target '/home/binh/experiments/RL/OgmaNeo2020/OgmaNeo2/install/lib/libOgmaNeo.a', needed by '_pyogmaneo.so'. Stop.

That means it need static library.

But if I insert the static library, I got other errors:
running install
running build_ext
CMAKE_BUILD_TYPE not set, setting it to Release
-- Build type: Release
Python target version: 3
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/UseSWIG.cmake:486 (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):
/usr/share/cmake-3.18/Modules/UseSWIG.cmake:736 (SWIG_ADD_SOURCE_TO_MODULE)
CMakeLists.txt:100 (swig_add_library)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/binh/experiments/RL/OgmaNeo2020/PyOgmaNeo2/build/temp.linux-x86_64-3.8
cmake --build . --config Release
[ 57%] Built target PyOgmaNeoCpp
[ 71%] Built target pyogmaneo_swig_compilation
[ 85%] Linking CXX shared module _pyogmaneo.so
/usr/bin/ld: /home/binh/experiments/RL/OgmaNeo2020/OgmaNeo2/install/lib/libOgmaNeo.a(Hierarchy.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt14_Function_base13_Base_managerISt5_BindIFPFviRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEPKSt6vectorIiSaIiEEPS7_ESt12_PlaceholderILi1EESD_ILi2EES9_SA_EEE10_M_managerERSt9_Any_dataRKSJ_St18_Manager_operation' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pyogmaneo.dir/build.make:108: _pyogmaneo.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/pyogmaneo.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
error: command 'cmake' failed with exit status 2

I found the following solutions that you have to change CMakeList.txt

  1. in OgmaNeo2 by inserting compiling flag -fPIC
  2. in PyOgmaNeo2 1. using C++14 instead of -std=c++14
    Then it works ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.