python bundled by py2app still points to local path - py2app

I would like to create a macOS app using py2app. My application (testapp) has a few dependencies
(paramiko,scp,PyYAML,PyQt5). To do so:
I installed python3 using brew (located in /usr/local/Cellar).
I installed the aforementioned dependencies in this python
I ran python3 setup.py py2app --packages paramiko,yaml,scp
Everything runs apparently fine. I have a testapp.app directory created in dist. However, when I run the python located in the bundle (./dist/testapp.app/Contents/MacOS/python) I run into troubles. Indeed, I can import the aforementioned external packages but when I inspect their path, the result gives me the local installation and not the one of the bundle.
For instance paramiko.__path__ gives me: /usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/paramiko
Looking deeper into the bundle, I could not find the file site-packages.zip which should be created by py2app.
As such my bundle is absolutely not self consistent and can not be distributed on other machines. Would you have any idea about what is wrong with my setup ?
EDIT: I forgot to mention that I started to inspect the embedded python because running the embedded app failed.

Related

Installing an editable python package inside a docker container

I am trying to fix a bug in a python package for my project that runs inside a docker container.
The package I am talking about is django-allauth and I found a small with one of the providers.
I know that I need to copy the edited package into the container and install it like this:
COPY folder/with/package /somefolder_inside_container/
RUN pip install -e /somefolder_inside_container/
The root folder of this project on github contains a lot of files and I am not sure if I should include them for copying to make sure the package installs. Do i need to copy anything besides the 'allauth' folder that contains all the models/views/etc. ?

How do I delete a ros/gazebo-simulation completly

I have a kinda weird problem. I'm currently messing around with the VRX-Simulator, which simulates an unmanned-watersurface-vehicle.
For the installation I followed the guide on https://bitbucket.org/osrf/vrx/wiki/tutorials/SystemSetupInstall.
Then I tried to modify some of the files and tried to rebuild the project.
This was the point when I noticed it always used the "old" version of my simulation within gazebo.
From now on no matter what I did (I even deleted the whole catkin workspace folder) ROS somehow managed to always launch the original version of my simulation even without any build/src folder existing when I used roslaunch.
roslaunch vrx_gazebo sandisland.launch
So my question would be how can I get rid of my simulation/model and where does ros/gazebo cache my simulation?
You most probably installed the package with the command from the tutorial sudo apt install ros-melodic-vrx-gazebo. So the package launched with roslaunch vrx_gazebo sandisland.launch was not in your catkin workspace. If you want to get rid of it you can uninstall it with sudo apt remove ros-melodic-vrx-gazebo. But this is not strictly necessary.
There are several ways to find out where some ros package is located, try running some of these commands:
rospack find vrx_gazebo will show you where the package used is located
roscd vrx_gazebo will take you to the folder where it is installed something like
/opt/ros/melodic/share/vrx_gazebo
If you also followed the tutorials installing from source code then the issue most likely was not sourcing the built packages. The last line of the guide is a bit misleading. The line *Remember to run this command every time you open a new terminal. is meant to reference the command source ~/vrx_ws/devel/setup.bash
Whether the installed package or the package built from source is used depends on which order they are listed in the environment variable ROS_PACKAGE_PATH. This variable is modified by both source /opt/ros/melodic/setup.bash and source ~/vrx_ws/devel/setup.bash. So have a look at the variable after each step with printenv | grep ROS or echo $ROS_PACKAGE_PATH. Theoretically if you source your terminal in the order I had the source commands it should be using the package built from source, you can verify with the rospack find ... and roscd ... commands mentioned earlier.
In the end it is probably easier to add the sourcing commands to your .bashrc file so you would not forget to source the terminals as mentioned in the ROS installation tutorial. You can add the sourcing of the workspace to the the same file, you will just have to be aware that you would need to change the file, should you want to use a different workspace.
http://wiki.ros.org/melodic/Installation/Ubuntu#melodic.2BAC8-Installation.2BAC8-DebEnvironment.Environment_setup
relevant command from the tutorial:
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
you could do the same for the workspace:
echo "source ~/vrx_ws/devel/setup.bash" >> ~/.bashrc
And after running those commands run exec bash to get the changes into the current terminal. All future terminals will have those commands already loaded.

Python 3.5 searching for libpython3.6m.so.1.0

I have a docker image based from python:3.5-slim, that I added Oracle 12 on it, so my tests on GitLab can run in it.
When GitLab start building the environment, like doing the pip install, I get this error message:
"/builds/root/ppc_busca/venv/bin/python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory"
The thing is, how can it complains about the file 'libpython3.6m' if my python version is 3.5? That is something that I don't understand.
Thanks for the help!

Cryptogen tool not found. Hyperledger fabric installation in Windows 10

I followed the Hyperledger fabric documentation to install and configure it in Windows 10. However when I run the command - "./byfn.sh -m generate" for first-network sample application, I get the following error,
I have gone thru all StackOverflow questions regarding this and made sure following steps are done,
Have set the $PATH variable correctly to include bin folder.
Have downloaded the platform-specific binary and my bin folder looks like this,
I have doubts about following steps,
I have installed Docker for Windows and was able to verify the docker installation by running hello-world image in Docker. However, I have not shared any of my local drives in Docker. Not sure whether this is the cause of this error.
Please note that this is my first question in StackOverflow. Forgive me for any mistakes/redundancies. Any help is greatly appreciated.
I'd suggest making sure that you run the script to download / install the binaries and images from within the fabric-samples directory.
The $Path is exported every time you run the byfn.sh script, confirm that the path configuration in the byfn.sh is correct and points to your correct bin location
# prepending $PWD/../bin to PATH to ensure we are picking up the correct binaries
# this may be commented out to resolve installed version of tools if desired
export PATH=${PWD}/../../bin:${PWD}:$PATH
export FABRIC_CFG_PATH=${PWD}

Rspec errors in Rails app using Nitrous.io - 'cannot open shared object file'

When I run bundle exec rspec spec/ I get the following messages in the console:
Could not open library 'libgtkmm-2.4': libgtkmm-2.4: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-2.4.so': libgtkmm-2.4.so: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-2.4.so.1': libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-3.0': libgtkmm-3.0: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-3.0.so': libgtkmm-3.0.so: cannot open shared object file: No such file or directory.
Could not open library 'libgtkmm-3.0.so.1': libgtkmm-3.0.so.1: cannot open shared object file: No such file or directory
But, all of the tests pass and my app works just fine. Can anyone fill me in on what may have happened? Should I just scrap this box and clone my repo into a fresh one? I'm using Ruby 2.0.0p247 and Rails 4.0.2 in a Nitrous.io box. Thanks.
Even though unrelated (thank google for finding this), I have been trying to install Nitrogen for Ubuntu today. I get the same error. Seems like a specific GTK library has gone missing recently from either your system or your distro's repository (if you're even using Linux).
If you're using a Linux system, install the libgtkmm packages and if you're lucky enough, your missing library will be in one of those.
Use in Ubuntu this to install all of them:
sudo apt-get install libgtkmm*
Hope this helps.

Resources