__main__ module not found in em package while installing ROS - python

I am trying to install ROS Noetic. I am stuck at the "catkin_make install" step. While trying to execute the above command, I am getting the following error.
command line catkin_make
The error that I am getting
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic;/home/anant/ros2_foxy/install/yaml_cpp_vendor;/home/anant/ros2_foxy/install/ament_cmake_uncrustify;/home/anant/ros2_foxy/install/uncrustify_vendor;/home/anant/ros2_foxy/install/tracetools;/home/anant/ros2_foxy/install/tinyxml2_vendor;/home/anant/ros2_foxy/install/qt_gui;/home/anant/ros2_foxy/install/tango_icons_vendor;/home/anant/ros2_foxy/install/spdlog_vendor;/home/anant/ros2_foxy/install/rosidl_typesupport_interface;/home/anant/ros2_foxy/install/rosidl_generator_dds_idl;/home/anant/ros2_foxy/install/rosidl_cmake;/home/anant/ros2_foxy/install/rosidl_parser;/home/anant/ros2_foxy/install/rosidl_adapter;/home/anant/ros2_foxy/install/rmw_implementation_cmake;/home/anant/ros2_foxy/install/python_qt_binding;/home/anant/ros2_foxy/install/launch_testing_ament_cmake;/home/anant/ros2_foxy/install/python_cmake_module;/home/anant/ros2_foxy/install/osrf_testing_tools_cpp;/home/anant/ros2_foxy/install/ament_cmake_ros;/home/anant/ros2_foxy/install/ament_cmake_gmock;/home/anant/ros2_foxy/install/gmock_vendor;/home/anant/ros2_foxy/install/ament_cmake_gtest;/home/anant/ros2_foxy/install/gtest_vendor;/home/anant/ros2_foxy/install/ament_cmake_google_benchmark;/home/anant/ros2_foxy/install/google_benchmark_vendor;/home/anant/ros2_foxy/install/foonathan_memory_vendor;/home/anant/ros2_foxy/install/fastrtps_cmake_module;/home/anant/ros2_foxy/install/fastcdr;/home/anant/ros2_foxy/install/eigen3_cmake_module;/home/anant/ros2_foxy/install/cyclonedds;/home/anant/ros2_foxy/install/connext_cmake_module;/home/anant/ros2_foxy/install/ament_cmake_xmllint;/home/anant/ros2_foxy/install/ament_cmake_pep257;/home/anant/ros2_foxy/install/ament_lint_auto;/home/anant/ros2_foxy/install/ament_cmake;/home/anant/ros2_foxy/install/ament_cmake_version;/home/anant/ros2_foxy/install/ament_cmake_pytest;/home/anant/ros2_foxy/install/ament_cmake_lint_cmake;/home/anant/ros2_foxy/install/ament_cmake_flake8;/home/anant/ros2_foxy/install/ament_cmake_cpplint;/home/anant/ros2_foxy/install/ament_cmake_cppcheck;/home/anant/ros2_foxy/install/ament_cmake_copyright;/home/anant/ros2_foxy/install/ament_cmake_test;/home/anant/ros2_foxy/install/ament_cmake_target_dependencies;/home/anant/ros2_foxy/install/ament_cmake_python;/home/anant/ros2_foxy/install/ament_cmake_export_dependencies;/home/anant/ros2_foxy/install/ament_cmake_libraries;/home/anant/ros2_foxy/install/ament_cmake_include_directories;/home/anant/ros2_foxy/install/ament_cmake_export_targets;/home/anant/ros2_foxy/install/ament_cmake_export_link_flags;/home/anant/ros2_foxy/install/ament_cmake_export_interfaces;/home/anant/ros2_foxy/install/ament_cmake_export_libraries;/home/anant/ros2_foxy/install/ament_cmake_export_include_directories;/home/anant/ros2_foxy/install/ament_cmake_export_definitions;/home/anant/ros2_foxy/install/ament_cmake_core;/home/anant/ros2_foxy/install/ament_index_cpp
-- This workspace overlays: /opt/ros/noetic
-- Found PythonInterp: /home/anant/anaconda3/bin/python3 (found suitable version "3.8.5", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /home/anant/anaconda3/bin/python3
-- Using Debian Python package layout
-- Using empy: /home/anant/anaconda3/lib/python3.8/site-packages/em
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/anant/catkin_ws/src/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /home/anant/anaconda3/bin/python3 (found version "3.8.5")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.9
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
/home/anant/anaconda3/bin/python3: can't find '__main__' module in '/home/anant/anaconda3/lib/python3.8/site-packages/em'
CMake Error at /opt/ros/noetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/home/anant/catkin_ws/src/catkin_generated/env_cached.sh
"/home/anant/anaconda3/bin/python3"
"/home/anant/anaconda3/lib/python3.8/site-packages/em" "--raw-errors" "-F"
"/home/anant/catkin_ws/src/catkin_generated/order_packages.py" "-o"
"/home/anant/catkin_ws/src/catkin_generated/order_packages.cmake"
"/opt/ros/noetic/share/catkin/cmake/em/order_packages.cmake.em") returned
error code 1
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/em_expand.cmake:25 (safe_execute_process)
/opt/ros/noetic/share/catkin/cmake/catkin_workspace.cmake:35 (em_expand)
CMakeLists.txt:69 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/home/anant/catkin_ws/src/CMakeFiles/CMakeOutput.log".
See also "/home/anant/catkin_ws/src/CMakeFiles/CMakeError.log".
link to the tutorial I am following
http://wiki.ros.org/catkin/commands/catkin_make
It would be very helpful if someone could help me in this regards
Thanks in Advance!!

I had this problem because I have anaconda installed.
The catkin was looking for the package in: /home/leandro/anaconda3/lib/python3.8/site-packages/
after uninstalling them from the current and sudo users with
pip uninstall em empy and
sudo pip uninstall em empy
catkin was able to find the correct em and empy packages at /usr/lib/python3/dist-packages/em.py
I am afraid there is an nice spaghetti in my system right now, but the catkin works.

Related

Python_LIBRARY in CMake NotFound

I'm trying to build the open-source software LMGC90 (https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/-/wikis/compilation) and I have a trouble when I try to use the command >cmake. Details are below:
CMake Error: The following variables are used in this project, but
they are set to NOTFOUND. Please set them or make sure they are set
and tested correctly in the CMake files: PYTHON_LIBRARY
linked by target "ann_manh" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "ann_eucl" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "lmgc90" in directory /home/tphan/lmgc90_user_2021.rc1/src/ChiPy
The full error message is:
tphan#tphan-XPS-15-9570:~/lmgc90_user_2021.rc1/build$ cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3
-- You try to build LMGC90_dev
fatal: not a git repository (or any of the parent directories): .git
-- Building git branch
-- A library with LAPACK API found.
-- Found Python executable: /usr/bin/python3.8
-- Found Python library: PYTHON_LIBRARY-NOTFOUND
-- Python version is : 3.8.10
-- Python include dir is : /usr/include/python3.8
-- Cython not found... deactivate rTree Python binding
-- Matlib Library used : /home/tphan/lmgc90_user_2021.rc1/build/lib/libmatlib.so
-- Sparse linear algebra include path found: /home/tphan/lmgc90_user_2021.rc1/build/include
-- Sparse linear algebra libraries found: /home/tphan/lmgc90_user_2021.rc1/build/lib/libdmumps.so
-- Sparse linear algebra binding found: /home/tphan/lmgc90_user_2021.rc1/src/contribs/Mumps_SparseLinearAlgebra.f90
-- matlib library : /home/tphan/lmgc90_user_2021.rc1/build/lib/libmatlib.so
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY
linked by target "ann_manh" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "ann_eucl" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "lmgc90" in directory /home/tphan/lmgc90_user_2021.rc1/src/ChiPy
-- Configuring incomplete, errors occurred!
See also "/home/tphan/lmgc90_user_2021.rc1/build/CMakeFiles/CMakeOutput.log".
See also "/home/tphan/lmgc90_user_2021.rc1/build/CMakeFiles/CMakeError.log".```
Do you know how I can fix this?
You must specify the path to the Python library as:
cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so

Problems during compilation of ros-indigo-qt-gui-cpp in Arch Linux ARM

I'm using ROS Indigo with Arch Linux ARM and i'm trying to install the package ros-indigo-qt-gui-cpp from AUR.
But the following error arises:
==> Starting build()...
-- Using CATKIN_DEVEL_PREFIX: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.12")
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using default Python package layout
-- Using empy: /usr/lib/python2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: ON
-- Skip enable_testing() when building binary package
-- Using CATKIN_TEST_RESULTS_DIR: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.18
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106200
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:5 (find_package)
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106200
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:5 (find_package)
-- Boost version: 1.62.0
-- Found the following Boost libraries:
-- filesystem
-- system
CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:17 (find_package):
By not providing "FindShiboken.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Shiboken",
but CMake did not find one.
Could not find a package configuration file provided by "Shiboken" with any
of the following names:
ShibokenConfig.cmake
shiboken-config.cmake
Add the installation prefix of "Shiboken" to CMAKE_PREFIX_PATH or set
"Shiboken_DIR" to a directory containing one of the above files. If
"Shiboken" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)
CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:21 (find_package):
By not providing "FindPySide.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "PySide", but
CMake did not find one.
Could not find a package configuration file provided by "PySide" with any
of the following names:
PySideConfig.cmake
pyside-config.cmake
Add the installation prefix of "PySide" to CMAKE_PREFIX_PATH or set
"PySide_DIR" to a directory containing one of the above files. If "PySide"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)
CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:34 (find_package):
By not providing "FindGeneratorRunner.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"GeneratorRunner", but CMake did not find one.
Could not find a package configuration file provided by "GeneratorRunner"
with any of the following names:
GeneratorRunnerConfig.cmake
generatorrunner-config.cmake
Add the installation prefix of "GeneratorRunner" to CMAKE_PREFIX_PATH or
set "GeneratorRunner_DIR" to a directory containing one of the above files.
If "GeneratorRunner" provides a separate development package or SDK, be
sure it has been installed.
Call Stack (most recent call first):
src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)
CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:41 (message):
Shiboken binding generator NOT available.
Call Stack (most recent call first):
src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2.7")
-- SIP binding generator available.
-- Python binding generators: sip
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build
[ 7%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/recursive_plugin_provider.cpp.o
[ 14%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/settings.cpp.o
[ 21%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/__/__/include/qt_gui_cpp/moc_plugin_bridge.cxx.o
[ 28%] Linking CXX shared library ../../devel/lib/libqt_gui_cpp.so
[ 78%] Built target qt_gui_cpp
Scanning dependencies of target libqt_gui_cpp_sip
[ 85%] Running SIP generator for qt_gui_cpp_sip Python bindings...
Traceback (most recent call last):
File "/opt/ros/indigo/share/python_qt_binding/cmake/sip_configure.py", line 50, in
config = Configuration()
File "/opt/ros/indigo/share/python_qt_binding/cmake/sip_configure.py", line 19, in __init__
['qmake', '-query'], env=env, universal_newlines=True)
File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make[2]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_s`enter code here`ip.dir/build.make:90: sip/qt_gui_cpp_sip/Makefile] Error 1
make[1]: *** [CMakeFiles/Makefile2:375: src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Any ideia?
If i haven't provided enough information, please tell so that i might provided anything need to help to solve it.
I don't know where to go.
Like a warrior coming home after a hard and bleeding battle war, i'm here glad to say i could solve it!
You should have qt5-base installed before installing the package ros-indigo-qt-gui-cpp.
This way, when you try to install it, you'll probably face the following issue:
Getting fatal error: QWidget: No such file or directory
#include <QWidget>
In order to solve it, i did:
vim /yourpath/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/plugin_context.h
then change:
#include <QWidget>
by:
#include <QtGui>
Then you will probably face another issue[1] this time about the version of qmake that is running.
which qmake will show you which qmake is in your path.
You have to make sure you are using qmake for qt4.
So the last change, was:
sudo mv /usr/bin/qmake /usr/bin/qmake.bk
sudo ln -s /usr/bin/qmake-qt4 /usr/bin/qmake
Note that commands might change depending on your environment setup, if you're using anaconda, for example
( Make sure to revert those changes later if you want to. )
Everything shoud be fine afterall :D
They aren't here, but thanks for AUR users as well :D
[1] error: no matching function for call to ‘sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::connectNotify(const char*&)’

Error installing/compiling grpc on Ubuntu

I have protobuf compiler version 3.0 and need to install grpc and grpc python plugin. Following the tutorial, I added deb http://http.debian.net/debian jessie-backports main to my sources.list file and did sudo apt-get update and sudo apt-get install libgrpc-dev which returned
Package libgrpc-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libgrpc-dev' has no installation candidate
So, I decided to compile it from source as mentioned in INSTALL notes and did:
$ git clone https://github.com/grpc/grpc.git
$ cd grpc
$ git submodule update --init
$ make
$ [sudo] make install
However, on the make step, I get
[MAKE] Generating cache.mk
make: Circular /home/vagrant/grpc2/grpc/libs/opt/libboringssl.a <- /home/vagrant/grpc2/grpc/libs/opt/libboringssl.a dependency dropped.
[C] Compiling third_party/boringssl/crypto/bio/connect.c
third_party/boringssl/crypto/bio/connect.c: In function 'split_host_and_port':
third_party/boringssl/crypto/bio/connect.c:127:17: error: declaration of 'close' shadows a global declaration [-Werror=shadow]
cc1: all warnings being treated as errors
make: *** [/home/vagrant/grpc2/grpc/objs/opt/third_party/boringssl/crypto/bio/connect.o] Error 1
On switching to the release-0_11 branch, running make results in
[HOSTCXX] Compiling src/compiler/csharp_generator.cc
src/compiler/csharp_generator.cc:47:43: error: 'google::protobuf::compiler::csharp::GetUmbrellaClassName' has not been declared
src/compiler/csharp_generator.cc: In function 'void grpc_csharp_generator::{anonymous}::GenerateServiceDescriptorProperty(grpc::protobuf::io::Printer*, const ServiceDescriptor*)':
src/compiler/csharp_generator.cc:237:62: error: 'GetUmbrellaClassName' was not declared in this scope
make: *** [/home/vagrant/grpc2/grpc/objs/opt/src/compiler/csharp_generator.o] Error 1
I can't figure out how to install this. Any help would be appreciated.
For me the issue got fixed after i made change in the file as:
diff --git a/src/compiler/csharp_generator.cc
b/src/compiler/csharp_generator.cc
index 7b497df..5a8746d 100644
--- a/src/compiler/csharp_generator.cc
+++ b/src/compiler/csharp_generator.cc
## -44,7 +44,7 ##
using google::protobuf::compiler::csharp::GetFileNamespace;
using google::protobuf::compiler::csharp::GetClassName;
-using google::protobuf::compiler::csharp::GetUmbrellaClassName;
+using google::protobuf::compiler::csharp::GetReflectionClassName;
using grpc::protobuf::FileDescriptor;
using grpc::protobuf::Descriptor;
using grpc::protobuf::ServiceDescriptor;
## -234,7 +234,7 ## void GenerateServiceDescriptorProperty(Printer* out, const ServiceDescriptor *se
out->Print("public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor\n");
out->Print("{\n");
out->Print(" get { return $umbrella$.Descriptor.Services[$index$]; }\n",
- "umbrella", GetUmbrellaClassName(service->file()), "index",
+ "umbrella", GetReflectionClassName(service->file()), "index",
index.str());
out->Print("}\n");
out->Print("\n");
More specifically, please open the file src/compiler/csharp_generator.cc and replace all references of GetUmbrellaClassName by GetReflectionClassName
Working backwards:
for release-0_11: it looks like you're trying to compile against the most recent protobuf. Since we're both in development right now there's occasional breakage - but grpc does track the version of protobuf it's tested against in third_party/protobuf. Try checking out and installing that version. I filed https://github.com/grpc/grpc/issues/4697 to update to the latest protobuf 3.0 version.
for master from github: which compiler and OS are you using? I recently checked in the boringssl integration work, so it's fresh, and not nearly as battle-tested. I'd like to get it battle-tested. That said, if you do a 'make EMBED_OPENSSL=false' then things should work out for you.
for the debian package problem: I'm not sure what's going on. I'm happy to try and spin up a VM with your OS and repro if you can let me know which OS it is.

Installing PyGMO on Mac OS X Yosemite - missing boost-python3?

I've been trying to install PyGMO on my Mac OS X 10.10. I'm using Anaconda Python 2.3, so it comes with python 3.4.
I followed the instructions on http://esa.github.io/pygmo/install.html and did try to build boost manually but didn't have much luck with building boost-python... The instructions I could find on the official website was very limited...
While using ccmake to run the build file in pagmo/build directory, it complained that it did not find boost-python3...
So I reverted to using brew to install boost. Thanks to the info I found on this page: http://ryanclouser.com/2015/07/16/Mac-OSX-Build-Boost-Python-with-Python3-Support/
Now I have both boost and boost-python installed, but still the ccmake process for PyGMO complains about not being able to find boost-python3.
Are there any environment variables I need to set? In the ccmake config screen do I need to set Boost_PYTHON3_LIBRARY_RELEASE or Boost_PYTHON3_LIBRARY_DEBUG?
LATEST EDIT: This SHA256 below mis-match is resolved. Turned out it was caused by source forge site being down when I ran the commands... Some better error messages would have helped.
However, when I tried to get boost and boost-python with brew, I got the following SHA256 hash code mismatch error.
Anyone has any idea how to fix this?
>$ sudo brew install boost-python --with-python3
==> Installing boost-python dependency: boost
==> Downloading https://homebrew.bintray.com/b...
####################################################################### 100.0%
==> Pouring boost-1.58.0.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/boost/1.58.0: 10718 files, 486M
==> Installing boost-python
==> Downloading https://downloads.sourceforge....
==> Downloading from http://downloads.sourceforge.n...
####################################################################### 100.0%
Error: SHA256 mismatch
Expected: fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5
Actual: 818a4b8bbcb50878a8b1b9f71b4274d242ab46bf860c74676e98dec1d0248821
Archive: /Library/Caches/Homebrew/boost-python-1.58.0.tar.bz2
To retry an incomplete download, remove the file above.
Tried to delete the cached boost package files as suggested a few times but it didn't work either.
Thanks guys.
Ok problem resolved. Here's the best practice to get boost on Mac OS X.
Use Homebrew! but the key is to use the --with-python3 switch! Credits to this page: http://ryanclouser.com/2015/07/16/Mac-OSX-Build-Boost-Python-with-Python3-Support/
>$ brew install boost-python --with-python3
Assuming you have CMake already, just follow the instructions on PyGMO's website.
pagmo/build>$ ccmake ../
This will then bring up the config screen, everything should look fine. If not, do rm -rf * in pagmo/build folder to clear everything and start again (this resolved the issue with boost-python3 for me mentioned above.
Then run make and sudo make install as mentioned on the website.
PyGMO should be ready for use in python after that!
I had the following error message. However, if I start python in the ~/anaconda/lib folder where I have my anaconda installed, import PyGMO worked, so it's probably some library path thing that needs to be fixed.
>>> import PyGMO as gmo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/xxx/anaconda/lib/python3.4/site-packages/PyGMO/__init__.py", line 57, in <module>
from PyGMO import core, algorithm, migration, problem, topology, test, util
File "/Users/xxx/anaconda/lib/python3.4/site-packages/PyGMO/core/__init__.py", line 2, in <module>
from PyGMO.core._core import *
ImportError: dlopen(/Users/xxx/anaconda/lib/python3.4/site-packages/PyGMO/core/_core.so, 2):
Library not loaded: libpython3.4m.dylib
Referenced from: /Users/xxx/anaconda/lib/python3.4/site-packages/PyGMO/core/_core.so
Reason: image not found
**Latested EDIT: ** Did some searching around, a partial solution to the import error above, is to set DYLD_LIBRARY_PATH=~/anaconda/lib. With this, imports will work when you launch python in a console. However, IPython-notebook would not start for me... Also have seen that Max OS doesn't really have a dynamic search also...

Building Qscintilla2 python bindings on Windows7 with MinGW (PyQt4.11, Qt4.8.6)

I've tried to resolve this prolem for about 3days, and I'd finally felt that I need to ask for help by creating my own question.
I have Windows 7x64 and Qt4.8.6 installed.
I need Python with PyQt and Qscintilla2 to be installed and working.
Now I wil describe my last actions. I did everything like included packages instructions said.
1) Installed Python2.7.9 32bit from official website.
2) Downloaded SIP from here (dev snapshot), then:
configure.py —platform win32-g++
mingw32-make
mingw32-make install
3) Downloaded PyQt from here (not the installer but dev snapshot, cause I need to build with MinGW and istaller producec MSVC version), then:
configure-ng.py -spec win32-g++
mingw32-make
mingw32-make install
Ater these steps I tested PyQt on my project - everything works fine.
Then I starded trying to install Qsnitilla2.
4) Downloaded Qsnitilla2 from here (dev snapshot), then:
a) in Qt4Qt5 folder:
qmake qscintilla.pro -spec win32-g++
mingw32-make
mingw32-make install
This had installed Qsnitilla2 in Qt4.8.6 as I saw;
b) in Python folder( F..ing Python bindngs, excuse my french):
config.py —spec win32-g++
mingw32-make
after this I got ld.exe error (linking error):
Then, afted doing some research, I manually edited my Makefile.Release (by adding -lpython27 to LIBS parameter):
LIBS = -L"c:\Qt-mingw\4.8.6\lib" -LC:\Python27\libs -LC:\Qt-mingw\4.8.6\lib -lqscintilla2 -lQtGui4 -lQtCore4 -lpython27
After this, my mingw32-make completed succesfully. So:
mingw32-make install
This had installed Qscintilla2 Python bindings.
Now I can see Qsci autocomlplete in Eclipse.
So i've tried this:
from PyQt4.Qsci import QsciScintilla
And i've got this in traceback:
from PyQt4.Qsci import QsciScintilla
ImportError: DLL load failed: Не найден указанный модуль
(Translation: The specified module could not be found)
I've tried this with both dev snapshot and src packages from Riverbank website. And also with MinGW 4.8.1 and MinGW-w64 4.8.4. I can't use MinGW-w64 over 4.8 version cause I need boost-1.55 and it only supports MinGW 4.8.
I don't know what to do now, but I really want to use Scintilla in my project. So i'll be very gratefull for any suggestions.
Have you ever tried to load the QsciScintilla right from the console? I mean you need to enter the directory where the QScintilla located( this means current folder is the default folder), then try run the command "from PyQt4.Qsci import QsciScintilla", if this load module failure still happens, this possibly means you need extra dynamic which QScintilla depends, you need to use dll dependency to find out if some other libraries were missing, then put the missing libraries into the same folder of QsciScintilla.

Categories

Resources