libmpi_cxx.so.40: cannot open shared object file - linux

Upon running a command that requires mpi, it fails with
error while loading shared libraries: libmpi_cxx.so.40: cannot open shared object file: No such file or directory
I'm running it in a conda environment pytorch_p36.
However, I checked that libmpi_cxx.so.40 is present in that same conda environment.
Command
locate libmpi_cxx
Output
/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libmpi_cxx.so
/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libmpi_cxx.so.40
/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libmpi_cxx.so.40.20.1
Is there some issue with PATH or LD_LIBRARY_PATH?
If so what? How can I make sure anaconda environment libs are picked up by the 2 environment vars?

Try this:
LD_LIBRARY_PATH=$CONDA_PREFIX/lib [[rest of your command, e.g. python foo.py]]

Related

gnuradio OOT module can't access shared object file while using gnuaradio companion (linux)

I've made an OOT module that uses a dynamic shared library.
The library files are located at "/home/username/intel/oneapi/ipp/2021.6.0/lib/intel64".
I've added to the module_folder/lib/CMakeFile.txt the line:
target_link_libraries(module_name -L/home/username/intel/oneapi/ipp/2021.6.0/lib/intel64 ipp_iw ippch ippcore ippcv ippdc ippi ipps ippvm)
to link all the libraries I need.
I've then used make && sudo make install to install the OOT module.
I've also added the line:
export LD_LIBRARY_PATH=~/intel/oneapi/ipp/2021.6.0/lib/intel64:$LD_LIBRARY_PATH to ~/.bashrc.
When I try to run a flow graph in gnuradio companion that uses the block from the OOT module i get the error: "ImportError: libippcore.so.10: cannot open shared object file: No such file or directory"
However if I try to run what gnuradio companion runs through the terminal:
/usr/bin/python3 -u /home/username/Documents/oot_test.py
I'm able to find the shared object file and it runs without any problems.
My question is how can i make gnuradio companion look for the shared object files in the given folder? (From my understanding the use of export LD_LIBRARY_PATH in .bashrc only executes when opening a terminal).
Classic problem of setting paths, especially LD_LIBRARY_PATH. In the shell you're manually starting python from, it's set correctly, the way you started GRC it's not.
Solution: Start GRC from the same shell, or make sure LD_LIBRARY_PATH is set for your whole session correctly, not just in a shell.

JupyterLab installation with pip3

I installed JupyterLab with
pip3 install jupyterlab --user
Yet, when trying I try to launch it (jupyter lab), I get the following error:
Error executing Jupyter command 'lab': [Errno 2] No such file or directory
The JupyterLab installation guide on github says that: "If installing using pip install --user, you must add the user-level bin directory to your PATH environment variable in order to launch jupyter lab"
But I don't what that means, I greatly appreciate any help. I am using Ubuntu 18.04
As said by the guide itself you need to add the user-level bin directory to your PATH environment variable, in order to do so you need at first spot which is the bin folder where Jupyter lab has been installed, and after that you can add that path with a simple command:
export PATH=$PATH:/path/to/your/jupyterlab/bin/directory
and it's done. You can check if you added it by running this other command:
echo $PATH
And you should see the content of PATH variable.
This method though will just add that variable for the current shell, meaning that when you close the terminal you lose the change in the variable. In order to make it permanent you need to edit another file which is ~/.bashrc.
One thing though, it's really important that you just add this line to the file:
PATH=$PATH:/path/to/your/jupyterlab/bin/directory
without changing all the rest of the file if you don't know what you are doing.
To give you a recap on what to do to make it permanent open a new shell and type:
gedit ~/.bashrc
This will open the file where you need to add the "export PATH...etc" command right at the end of the file in a new line. Then save the changes and reboot, from now on you should be able to open Jupyter lab directly from a shell with the command:
Jupyter lab

Flymake config error while opening python file but correctly setup flake

When I'm opening a python file in emacs I get the following error message:
Flymake: Configuration error has occured while running (flake8 >..../xyz_flymake.py). Flymake will be switched OFF.
But on the other hand it seems I've configured all the modules needed for elpy to work properly:
Elpy Configuration
Virtualenv........: None
RPC Python........: 3.5.3 (/usr/bin/python3.5)
Interactive Python: /usr/bin/python3.5 (/usr/bin/python3.5)
Emacs.............: 24.5.1
Elpy..............: 1.10.0
Jedi..............: 0.10.2
Rope..............: 0.10.5
Importmagic.......: 0.1.7
Autopep8..........: 0.1.7
Syntax checker....: flake8 (/usr/local/bin/flake8)
You have not activated a virtual env. While Elpy supports this, it is
often a good idea to work inside a virtual env. You can use M-x
pyvenv-activate or M-x pyvenv-workon to activate a virtual env.
The directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables
in that directory, so Emacs won't find them. If you are missing some
commands, do add this directory to your PATH.
Options
`Raised' text indicates buttons; type RET or click mouse-1 on a button
to invoke its action. Invoke [+] to expand a group, and [-] to
collapse an expanded group. Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.
How can I resolve this issue?
It is unclear what the configuration error is. It's possible that you're running into one of many issues.
You seem to want to use Python 3.5, but there's no clear indicator of what version of Python Flake8 is running on. It could be that elpy is detecting a mismatch and refusing to use Flake8 when it won't provide you any useful information. (Flake8 must be installed on the same version of Python that the code is intended to run on.)
Elpy seems insistent that you use a virtualenv or that you add ~/.local/bin/ to your PATH. I would advise doing both.
You can create a virtualenv by doing virtualenv ~/.elpy-venv and activate it with source ~/.elpy-venv/bin/activate.
You can edit your Shell's configuration file (e.g., ~/.bashrc, ~/.bash_profile, ~/.zshrc, etc.) to do export PATH="$PATH:~/.local/bin".

Installation Pymol error

I am trying to install pymol on Centos 6.5. After running setup.sh it looks everything is fine. But when I launch pymol I obtain this error:
/opt/pymol/pymol.exe: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory
Any help,please?
I am quite new in linux as you may notice...
Follow te instrucctions here and also check that you have installed libGLU, on Ubuntu this library is called libglu1-mesa.

Issue with $PYTHONPATH

I get the following message when trying to run virtualenv . --no-site-packages
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/
and your PYTHONPATH environment variable currently contains:
''
However, when I echo my PYTHONPATH, I see the path from the default setting:
/usr/local/python-3.3.1/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/:/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/
So my PYTHONPATH does contain the directory I am installing to.
Anyone have any ideas what is going on?
Turns out I needed to use virtualenv-3.3, not virtualenv.

Resources