Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
4318
views
Run python code from cron in an Anaconda environment
I need to run a python script using a specific anaconda environment, since I need to execute this script several times per day I would like to do it using the linux crontab file (/etc/crontab). When I launch the script from the linux command line it works fine: ~/anaconda2/envs/py36/bin/python ~/pro...
I need to run a python script using a specific anaconda environment, since I need to execute this script several times per day I would like to do it using the linux crontab file (/etc/crontab).
When I launch the script from the linux command line it works fine:
~/anaconda2/envs/py36/bin/python ~/production/web_scraping.py
I added the process to the crontab file:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
57 08 * * * user ~/anaconda2/envs/py36/bin/python ~/production/web_scraping.py | touch ~/test.txt
The line is correctly executed by cron, this is the cron log:
user@exmachina:~$ sudo cat /var/log/syslog | grep web_*
Jan 2 08:57:02 localhost CRON: (user) CMD (~/anaconda2/envs/py36/bin/python ~/web_scraping.py | touch ~/test.txt)
I added
| touch test.txt
to the cron line to ensure the line is executed, and the *test.txt* file is generated.
The python script uses Selenium to extract data from a web page, by means of the chrome webdriver. Can this be the reason the script runs fine from the command line but not from the cron file?
Thanks for your help!
jordi vidal
(11 rep)
Jan 2, 2018, 10:42 AM
• Last activity: Apr 15, 2025, 02:04 AM
1
votes
0
answers
52
views
How to use linux perf in a conda environment
I'm trying to use linux `perf` program in a conda environment, but the `perf` program seems to ignore the conda environment. I installed the `conda-forge::linux-perf` package in my conda environment, but when I run it I get this error: ``` $ perf record ls perf: error while loading shared libraries:...
I'm trying to use linux
perf
program in a conda environment, but the perf
program seems to ignore the conda environment. I installed the conda-forge::linux-perf
package in my conda environment, but when I run it I get this error:
$ perf record ls
perf: error while loading shared libraries: libdebuginfod.so.1: cannot open shared object file: No such file or directory
The library is installed in my conda environment:
$ ls $CONDA_PREFIX/lib/*debuginfod*
/home/pcarter/anaconda3/envs/spec_density/lib/libdebuginfod-0.191.so /home/pcarter/anaconda3/envs/spec_density/lib/libdebuginfod.so.1
/home/pcarter/anaconda3/envs/spec_density/lib/libdebuginfod.so
But perf
is not looking in this directory for libraries. Using strace
, I'm able to see where it is only looking in the base system directories, not the conda ones.
execve("/home/pcarter/anaconda3/envs/spec_density/bin/perf", ["perf", "record", "ls"], 0x7ffe078205b0 /* 99 vars */) = 0
access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
brk(NULL) = 0x556c19e15000
fcntl(0, F_GETFD) = 0
fcntl(1, F_GETFD) = 0
fcntl(2, F_GETFD) = 0
access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
readlink("/proc/self/exe", "/home/pcarter/anaconda3/envs/spe"..., 4096) = 50
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=138259, ...}) = 0
mmap(NULL, 138259, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9bf8a59000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 l\0\0\0\0\0\0"..., 832) = 832
...
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/haswell/x86_64/libdebuginfod.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/haswell/x86_64", 0x7fffe984d610) = -1 ENOENT (No such file or directory)
...
openat(AT_FDCWD, "/usr/lib/libdebuginfod.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
This is not what happens for other conda installed programs. Looking at strace
output for running the nasm
program, it is looking at the conda lib directory.
execve("/home/pcarter/anaconda3/envs/spec_density/bin/nasm", ["nasm"], 0x7ffffc123b60 /* 99 vars */) = 0
brk(NULL) = 0x189a000
readlink("/proc/self/exe", "/home/pcarter/anaconda3/envs/spe"..., 4096) = 50
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls/haswell/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls/haswell/x86_64", 0x7ffe9d0a04f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls/haswell/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls/haswell", 0x7ffe9d0a04f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls/x86_64", 0x7ffe9d0a04f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib/tls", 0x7ffe9d0a04f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/haswell/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib/haswell/x86_64", 0x7ffe9d0a04f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/haswell/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib/haswell", 0x7ffe9d0a04f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib/x86_64", 0x7ffe9d0a04f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/pcarter/anaconda3/envs/spec_density/bin/../lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/pcarter/anaconda3/envs/spec_density/bin/../lib", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
Is this a security feature of perf
? If so, what do I need to do to fix this?
FYI: I followed the instructions at this [page](https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html) to enable my conda perf
program to have the capabilities it needs.
$ sudo getcap /home/pcarter/anaconda3/envs/spec_density/bin/perf
/home/pcarter/anaconda3/envs/spec_density/bin/perf cap_sys_ptrace,cap_syslog,cap_perfmon=ep
**Update**
I found a work around, but still don't completely understand what is going on. Using sudo
to run perf
as *root* fixes the issue.
$ sudo $CONDA_PREFIX/bin/perf record ls
# Output of ls redacted here
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.021 MB perf.data (7 samples) ]
(I have to specify the path to perf
here since I'm using sudo
which uses the *root* user's PATH
) It looks like conda sets up the library search path using RPATH
in the executable. If you use readelf
to look at the perf
binary, it returns:
$ readelf -d $CONDA_PREFIX/bin/perf
Dynamic section at offset 0x948bc0 contains 45 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libelf.so.1]
0x0000000000000001 (NEEDED) Shared library: [libdebuginfod.so.1]
0x0000000000000001 (NEEDED) Shared library: [libdw.so.1]
0x0000000000000001 (NEEDED) Shared library: [libunwind-x86_64.so.8]
0x0000000000000001 (NEEDED) Shared library: [libunwind.so.8]
0x0000000000000001 (NEEDED) Shared library: [liblzma.so.5]
0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.3]
0x0000000000000001 (NEEDED) Shared library: [libpython3.12.so.1.0]
0x0000000000000001 (NEEDED) Shared library: [libz.so.1]
0x0000000000000001 (NEEDED) Shared library: [libzstd.so.1]
0x0000000000000001 (NEEDED) Shared library: [libcap.so.2]
0x0000000000000001 (NEEDED) Shared library: [libnuma.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000f (RPATH) Library rpath: [$ORIGIN/../lib]
where $ORIGIN
represents the directory the executable is in. So RPATH
does point to the conda lib
directory. However, perf
seems to be setup to ignore this depending on properties of the user running it. It does use it for *root* but not for my user account. I assume this is for security reasons. Is there a way to enable this for my user account?
pcarter
(111 rep)
Mar 3, 2025, 10:17 PM
• Last activity: Mar 4, 2025, 11:37 PM
0
votes
0
answers
93
views
Is it safe to invoke `apt` from within a conda environment?
I have a Python script which manages upgrading the system by invoking `apt` with different arguments via the `subprocess` module. It relies on the `python_toolkit` and `docker` libraries, so these need to be installed. Up until now I've installed these two modules in the user's Python environment, t...
I have a Python script which manages upgrading the system by invoking
apt
with different arguments via the subprocess
module.
It relies on the python_toolkit
and docker
libraries, so these need to be installed.
Up until now I've installed these two modules in the user's Python environment, that is, the OS's Python interpreter with the libraries residing somewhere in ~/
.
Python 3.12 now strongly recommends to not use Python without a virtual environment if external libraries need to be used, which can be overridden by adding --break-system-packages
.
For this reason I've installed python_toolkit
and docker
inside a miniconda environment and now executed my script once. It seems to have worked, but I am unsure if this is safe to do, to invoke apt
from within a Conda environment, mostly due to the possible alteration of LD_LIBRARY_PATH
.
Should I better create a normal virtual environment, or might using --break-system-packages
be just as good? In my case, nothing else than those two libraries will ever be needed for an environment-less Python. Everything else runs in Conda environments.
Daniel F
(937 rep)
Jan 31, 2025, 02:54 PM
• Last activity: Feb 1, 2025, 02:30 AM
9
votes
3
answers
29795
views
How to install awscli on Ubuntu 18.04?
This should be trivial but it seems that it is not. I formatted my comp and installed conda(I am used to this package tool) pip install awscli --upgrade --user Requirement already up-to-date: awscli in ./.local/lib/python3.7/site-packages (1.16.313) But now I have problem aws --version Command 'aws'...
This should be trivial but it seems that it is not.
I formatted my comp and installed conda(I am used to this package tool)
pip install awscli --upgrade --user
Requirement already up-to-date: awscli in ./.local/lib/python3.7/site-packages (1.16.313)
But now I have problem
aws --version
Command 'aws' not found, but can be installed with:
sudo snap install aws-cli # version 1.16.266, or
sudo apt install awscli
I tried
sudo apt install awscli
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package awscli 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 'awscli' has no installation candidate
I updated and upgraded my distro so I can not see any problems from that side. How to fix this?
snap install
error: This revision of snap "aws-cli" was published using classic confinement
and thus may perform arbitrary system changes outside of the security
sandbox that snaps are usually confined to, which may put your system at
risk.
If you understand and want to proceed repeat the command including
--classic.
MikiBelavista
(1755 rep)
Jan 9, 2020, 05:12 PM
• Last activity: Jan 13, 2025, 02:54 AM
0
votes
0
answers
104
views
Use custom command / script to launch Conda environment
I made a small script `ca.sh` to activate a specific Conda environment so I don't have to repeatedly type out `conda activate my_env`. The script is executable and in a directory in the $PATH. ``` #!/bin/bash conda activate airbyte ``` When I run it, it gives the error ``` CondaError: Run 'conda ini...
I made a small script
ca.sh
to activate a specific Conda environment so I don't have to repeatedly type out conda activate my_env
. The script is executable and in a directory in the $PATH.
#!/bin/bash
conda activate airbyte
When I run it, it gives the error
CondaError: Run 'conda init' before 'conda activate'
How do I get my script to activate the Conda environment in the current working directory? I'm running Ubuntu Linux.
ahron
(434 rep)
Jan 1, 2025, 05:08 AM
0
votes
1
answers
79
views
Cron issues when running python script in TMUX for a different conda environment
I have been trying to troubleshoot this issue for a while now and would like to ask for your help. Let's say that I need to run model.py inside a tmux session. Here are my steps for this to work: 1. Create tmux session 2. Activate conda environment model_env 3. Run model.py This will run using the p...
I have been trying to troubleshoot this issue for a while now and would like to ask for your help.
Let's say that I need to run model.py inside a tmux session. Here are my steps for this to work:
1. Create tmux session
2. Activate conda environment model_env
3. Run model.py
This will run using the packages that I need (mostly for data science work, ex: numpy and pandas) and will eventually run the script without any errors.
However, I've been trying to schedule this run using cron and encountered the following:
1. I print debugged the script and saw that the packages used are still using my "base" env and not my conda model_env.
2. This will in turn, generate errors since the numpy package is incorrect.
This is how my .sh file looks like:
#!/bin/bash
# Activate conda environment
conda activate model_env
# Name of the tmux session
SESSION_NAME="tmux_session"
# Path to your Python interpreter
PYTHON_PATH="/home/ubuntu/anaconda3/bin/python3"
# Path to your Python script
SCRIPT_PATH="/home/ubuntu/model/model.py"
# Log file
LOG_FILE="/home/ubuntu/cron_scheduler/logs/model/model_$(date +'%Y-%m-%d_%H-%M-%S').log"
# Start a new tmux session if it doesn't exist
tmux has-session -t $SESSION_NAME 2>/dev/null
if [ $? != 0 ]; then
tmux new-session -d -s $SESSION_NAME
fi
# Run the script in the tmux session
tmux send-keys -t $SESSION_NAME "$PYTHON_PATH $SCRIPT_PATH >> $LOG_FILE 2>&1" C-m
Any help will be greatly appreciated. Thanks.
easymoneysniper
(1 rep)
Sep 22, 2024, 11:54 AM
• Last activity: Sep 22, 2024, 12:07 PM
1
votes
0
answers
121
views
Mamba broken after updating ssl. ImportError: cannot dynamically load position-independent executable
I work on a linux server that is running Ubuntu. I have been using miniforge to manage environments with packages for specific tasks. Previously, I was using a global install of anaconda in but removed it from my path (and .bashrc) and deleted my environments associated with it before doing my own i...
I work on a linux server that is running Ubuntu. I have been using miniforge to manage environments with packages for specific tasks. Previously, I was using a global install of anaconda in but removed it from my path (and .bashrc) and deleted my environments associated with it before doing my own install of miniforge.
I installed a package using mamba (
mamba install -c conda-forge -c bioconda r-soupx
) and it updated openssl from 3.2.1 to 3.3.1. The install ran fine, but when loading R to run the package I got an error for a previously working package.
Error: package or namespace load failed for ‘Signac’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/welison/.conda/envs/mamba/envs/seurat5.0_decontx/lib/R/library/Rsamtools/libs/Rsamtools.so':
/home/welison/.conda/envs/decontX_reticulate/lib/python3.10/lib-dynload/../../libcrypto.so.3: version `OPENSSL_3.3.0' not found (required by /home/welison/.conda/envs/mamba/envs/seurat5.0_decontx/lib/./libssl.so.3)
In a new terminal I activated the environment and ran openssl help
based on reading a github help page and poking around. It ran fine. I started poking around directories and tried running openssl help
from the directory containing the openssl referenced by the environment, and this gave the following error:
openssl: error while loading shared libraries: libssl.so.3: cannot dynamically load position-independent executable
Clearing hash
didn't work, but running openssl help using a path to the global openssl did. I decided to try rolling back the install and ran conda list --revisions
but hit this error:
Traceback (most recent call last):
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/serialize.py", line 12, in
import ruamel.yaml as yaml
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/__init__.py", line 56, in
from ruamel.yaml.main import * # NOQA
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/main.py", line 17, in
from ruamel.yaml.loader import BaseLoader, SafeLoader, Loader, RoundTripLoader # NOQA
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/loader.py", line 7, in
from ruamel.yaml.constructor import (
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/constructor.py", line 4, in
import base64
File "/home/welison/.conda/envs/mamba/lib/python3.11/base64.py", line 11, in
import binascii
ImportError: libz.so.1: cannot dynamically load position-independent executable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/serialize.py", line 15, in
import ruamel_yaml as yaml
ModuleNotFoundError: No module named 'ruamel_yaml'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 17, in __call__
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/cli/main.py", line 36, in main_subshell
from ..base.context import context
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/base/context.py", line 35, in
from ..common.configuration import (
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/configuration.py", line 50, in
from .serialize import yaml_round_trip_load
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/serialize.py", line 17, in
raise ImportError(
ImportError: No yaml library available. To proceed, conda install ruamel.yaml
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/welison/.conda/envs/mamba/bin/conda", line 13, in
sys.exit(main())
^^^^^^
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/cli/main.py", line 109, in main
return conda_exception_handler(main, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 389, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 20, in __call__
return self.handle_exception(exc_val, exc_tb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 52, in handle_exception
from .exceptions import (
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exceptions.py", line 15, in
import requests
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/requests/__init__.py", line 43, in
import urllib3
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/urllib3/__init__.py", line 13, in
from . import exceptions
File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/urllib3/exceptions.py", line 7, in
from http.client import IncompleteRead as httplib_IncompleteRead
File "/home/welison/.conda/envs/mamba/lib/python3.11/http/client.py", line 71, in
import email.parser
File "/home/welison/.conda/envs/mamba/lib/python3.11/email/parser.py", line 12, in
from email.feedparser import FeedParser, BytesFeedParser
File "/home/welison/.conda/envs/mamba/lib/python3.11/email/feedparser.py", line 27, in
from email._policybase import compat32
File "/home/welison/.conda/envs/mamba/lib/python3.11/email/_policybase.py", line 7, in
from email import header
File "/home/welison/.conda/envs/mamba/lib/python3.11/email/header.py", line 14, in
import binascii
ImportError: libz.so.1: cannot dynamically load position-independent executable
Every mamba or conda command leads to an error like this, including activating and deactivating environments and search. This is a new problem for me, but a few other users on this server had a similar issue a month back and never managed to resolve it.
Weston Elison
(11 rep)
Jun 11, 2024, 07:56 PM
• Last activity: Jun 11, 2024, 07:56 PM
0
votes
1
answers
230
views
CMake against Conda environment
I am trying to build some project ([crocoddyl](https://github.com/loco-3d/crocoddyl)) against the conda environment using CMake. Build command is: `cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ${CMAKE_ARGS} -S . -B build` I have all the necessary dependencies, namely pinocchio, libboost-python-devel,...
I am trying to build some project ([crocoddyl](https://github.com/loco-3d/crocoddyl)) against the conda environment using CMake. Build command is:
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ${CMAKE_ARGS} -S . -B build
I have all the necessary dependencies, namely pinocchio, libboost-python-devel, eignepy. CMake successfully finds eignepy, it is fine, however, when eigenpy checks for boost-python dependency, everything crashes with error:
CMake Error at /home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: python310) (found version "1.85.0")
Call Stack (most recent call first):
/home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindBoost.cmake:2393 (find_package_handle_standard_args)
/home/m8/micromamba/envs/sber-croc/lib/cmake/eigenpy/boost.cmake:144 (find_package)
/home/m8/micromamba/envs/sber-croc/lib/cmake/eigenpy/eigenpyConfig.cmake:149 (SEARCH_FOR_BOOST_PYTHON)
cmake/package-config.cmake:110 (find_package)
CMakeLists.txt:90 (add_project_dependency)
I know for sure, that $CONDA_PREFIX/lib
contains libboost_python310.so
and libboost_python310.so.1.84.0
. However my host system does not have python bindings and only has 1.85.0 version of boost. So I think that during CMake, somehow find_package of eigenpy messes with prefixes and looks in the wrong lib dir.
How do I either ignore the system lib or properly specify prefixes?
I have tried export CMAKE_PREFIX_PATH=$CONDA_PREFIX
as well as -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
with no luck. Exporting LD_LIBRARY_PATH
did not have effect either. CMake, compilers, pkg-config, everything is installed in conda environment.
m8dotpie
(1 rep)
May 28, 2024, 07:41 AM
• Last activity: May 30, 2024, 10:34 AM
0
votes
1
answers
4711
views
Why does "alias python=/usr/local/bin/python3.7" keep getting appended to my .zshrc every time I open up a homebrew managed version of Anaconda?
I run a fairly stock .zshrc configuration. Stock meaning only a couple of aliases and a theme. But every time I open my .zshrc, I see several appended lines that all say this: ```` "alias python=/usr/local/bin/python3.7" ```` Here is the teminal output from during the launch: ``` To access the noteb...
I run a fairly stock .zshrc configuration. Stock meaning only a couple of aliases and a theme. But every time I open my .zshrc, I see several appended lines that all say this:
`
"alias python=/usr/local/bin/python3.7"
`
Here is the teminal output from during the launch:
To access the notebook, open this file in a browser:
file:///Users/alexrook/Library/Jupyter/runtime/nbserver-22716-open.html
Or copy and paste one of these URLs:
http://localhost:8890/?token=d9124fbeae0ec69f3bad4e31cfd0b22d568a08c4ef053227
or http://127.0.0.1:8890/?token=d9124fbeae0ec69f3bad4e31cfd0b22d568a08c4ef053227
[E 20:14:12.598 NotebookApp] Could not open static file ''
[W 20:14:12.726 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 13.87ms referer=http://localhost:8890/tree?token=d9124fbeae0ec69f3bad4e31cfd0b22d568a08c4ef053227
[W 20:14:12.861 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 1.45ms referer=http://localhost:8890/tree?token=d9124fbeae0ec69f3bad4e31cfd0b22d568a08c4ef053227
hrokr
(109 rep)
Aug 25, 2019, 02:16 AM
• Last activity: Apr 24, 2024, 11:02 AM
0
votes
1
answers
1407
views
How do I clear the cache without restarting my terminal?
I'm currently working on the POD supercomputer at UT Austin. Tech support for the supercomputer couldn't help me. There's a specific version of Python (3.9) I want to use in my Anaconda environment, but an incorrect version of Python (3.11) is cached: [![enter image description here][1]][1] I initia...
I'm currently working on the POD supercomputer at UT Austin. Tech support for the supercomputer couldn't help me. There's a specific version of Python (3.9) I want to use in my Anaconda environment, but an incorrect version of Python (3.11) is cached:
I initially solved this issue by doing hash -r and then restarting my terminal (the changes don't take place unless I restart it). However, this solution doesn't work when I type "screen." The cached location for Python comes back. I can't do hash -r and then restart "screen" because it'll create a new process and the cache comes back.
Do you have a solution for clearing the hash table whenever I do "screen?"
Thanks!

himinam
(1 rep)
Jan 2, 2024, 09:01 PM
• Last activity: Jan 2, 2024, 11:07 PM
7
votes
3
answers
9139
views
how to modify the anaconda environment prompt in zsh?
To make my command line prompt look prettier on zsh, I added this line to `.zshrc`: PROMPT='%F{green}%n%f %B%F{blue}%1~%f%b $ ' However, when I activate an anaconda virtual environment (i.e. `conda activate base`), I see the name of the virtual environment on the left like this: (base) myusername ~...
To make my command line prompt look prettier on zsh, I added this line to
.zshrc
:
PROMPT='%F{green}%n%f %B%F{blue}%1~%f%b $ '
However, when I activate an anaconda virtual environment (i.e. conda activate base
), I see the name of the virtual environment on the left like this:
(base) myusername ~ $
I wonder how I can modify the virtual environment part of the prompt (say we want to color it to cyan for example)
Firat Cem Gurbey
(71 rep)
Jun 27, 2021, 04:36 PM
• Last activity: Dec 19, 2023, 11:58 AM
1
votes
0
answers
1925
views
Computer running on Debian 12 now only turns on in tty1 mode and I cannot access the GUI
I have an ASUS ZenBook 14, and I have been running it on stable Debian (now 12 Bookworm), and GNOME destop environment since I bought it. It has never given me any problems. But today after installing the platform Anaconda (though I am not completely sure this was the cause) this way: bash /home/"us...
I have an ASUS ZenBook 14, and I have been running it on stable Debian (now 12 Bookworm), and GNOME destop environment since I bought it. It has never given me any problems.
But today after installing the platform Anaconda (though I am not completely sure this was the cause) this way:
bash /home/"username"/Downloads/Anaconda3-2023.07-Linux-86_64.sh
then I updated and upgraded the system in the usual way (
sudo apt update
& sudo apt upgrade
). After turning off and later on the conputer, the system broke and the computer no longer turns on in the normal way.
Now I am stuck in the "tty1" mode and due to some error I can use the terminal but no other interfaces are available. When running startx
, a black screen appears with a mouse on it. I can move the mouse, but nothing more.
I think the "AE_NOT_FOUND" note that appears on the screen when turning on is important. As I am quite sure that wasn't there before.
How can I fix this?
I will share the photos of my computer to see if you can find the clues that could fix my problem.
Thank you very much in advance!



Ander Aristondo
(39 rep)
Sep 25, 2023, 10:00 PM
• Last activity: Sep 26, 2023, 12:27 AM
1
votes
1
answers
1117
views
Can I use nohup in a conda environment?
I should run a program in a conda environment in a remote linux server connected via ssh, which takes really long. Can I use nohup so I can logout? Will there occur any problem due to conda environment or how can I proceed?
I should run a program in a conda environment in a remote linux server connected via ssh, which takes really long. Can I use nohup so I can logout? Will there occur any problem due to conda environment or how can I proceed?
heyula
(19 rep)
May 25, 2023, 06:39 AM
• Last activity: May 31, 2023, 02:52 PM
0
votes
0
answers
349
views
Bash error after Installing Conda on WSL Ubuntu
I install Conda following the official manual on WSL Ubuntu in my desktop. However, after initiating Conda, every time launching the terminal, it shows ```none -bash: eval: line 141: syntax error near unexpected token `(' -bash: eval: line 141: `export CONDA_PROMPT_MODIFIER='(base) '' (base) root@DE...
I install Conda following the official manual on WSL Ubuntu in my desktop. However, after initiating Conda, every time launching the terminal, it shows
-bash: eval: line 141: syntax error near unexpected token `('
-bash: eval: line 141: `export CONDA_PROMPT_MODIFIER='(base) ''
(base) root@DESKTOP-KT6HJIP:~#
In this conda, once activating the new environment, it shows both names of the new and base environments.
(base) root@DESKTOP-KT6HJIP:~# conda create -n new
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /root/miniconda3/envs/new
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate new
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) root@DESKTOP-KT6HJIP:~# conda activate new
-bash: syntax error near unexpected token `('
(new) (base) root@DESKTOP-KT6HJIP:~#
What's more, I cannot install packages in a new environment.
I have tried both WSL1/2 and Ubuntu-22.04/20.04, but suffered the same issue.
Any one could help me solve this problem?
YiweiZhu
(1 rep)
Mar 25, 2023, 05:13 PM
• Last activity: Mar 30, 2023, 02:40 PM
1
votes
1
answers
387
views
Why username and root are missing in linux server after installing tools with conda?
On the Linux server, I have my username that looks like below: (base) [david@meteor ~]$ I tried installing some tools using `conda` with the following: conda install -c bioconda or conda install -c conda-forge Once all tools are installed I don't see my username and root, it looks like this: (base)...
On the Linux server, I have my username that looks like below:
(base) [david@meteor ~]$
I tried installing some tools using
conda
with the following:
conda install -c bioconda
or
conda install -c conda-forge
Once all tools are installed I don't see my username and root, it looks like this:
(base)
Can anyone tell me what could be the problem here?
user9114
(11 rep)
Oct 19, 2022, 07:37 PM
• Last activity: Nov 21, 2022, 06:18 AM
0
votes
1
answers
17
views
retrieving un-named jupyter lab files after anaconda uninstall
So I got a message from somebody at Anaconda that I should refrain from using anaconda3 since it's not allowed within a company context to use it. Because I mainly used it as a launcher for `jupyter` notebooks, I uninstalled it. Of course, me being stupid I forgot to save my open panels before doing...
So I got a message from somebody at Anaconda that I should refrain from using anaconda3 since it's not allowed within a company context to use it. Because I mainly used it as a launcher for
jupyter
notebooks, I uninstalled it. Of course, me being stupid I forgot to save my open panels before doing that. When I launched it from the command line I was presented with an empty workspace.
I tried copying the .anaconda3_backup
workspace but that didn't really help a lot.
Would there be a way to retrieve what was in that workspace, knowing that the files may NOT have been saved as .pynbk
? I have been searching with updatedb
/locate
and grep
in the backup dir but no luck so far.
StarShine
(131 rep)
Nov 14, 2022, 01:41 PM
• Last activity: Nov 14, 2022, 02:56 PM
0
votes
1
answers
1509
views
Why can't I run conda command even though it is slready installed in the machine?
user_name@server_name:~/bbq_spatial$ pip show conda Name: conda Version: 4.3.16 Summary: OS-agnostic, system-level binary package manager. Home-page: https://github.com/conda/conda Author: Continuum Analytics, Inc. Author-email: conda@continuum.io License: BSD Location: /home/user_name/.local/lib/py...
user_name@server_name:~/bbq_spatial$ pip show conda
Name: conda
Version: 4.3.16
Summary: OS-agnostic, system-level binary package manager.
Home-page: https://github.com/conda/conda
Author: Continuum Analytics, Inc.
Author-email: conda@continuum.io
License: BSD
Location: /home/user_name/.local/lib/python3.9/site-packages
Requires: pycosat, requests, ruamel.yaml
Required-by:
user_name@server_name:~/bbq_spatial$ conda update conda
conda: command not found
user_name@server_name:~/bbq_spatial$
Why can't I run conda command even though it is slready installed in the machine?
How can I run conda command?
EDIT:
> Add the output of command -v pip and command -v conda to the question. – Nasir Riley
user_name@server_name:~$ command -v pip
/usr/local/bin/pip
user_name@server_name:~$ command -v conda
user_name@server_name:~$ command -v conda
user_name@server_name:~$
user366312
(429 rep)
Oct 22, 2022, 01:21 PM
• Last activity: Oct 22, 2022, 07:43 PM
0
votes
1
answers
1584
views
GCC-11 installation error in centos 7 (environmental changes)?
I installed the latest version of GCC 11.2V using conda, *conda install -c conda-forge* gcc" in my linux server (Centos7). After I try to login into my server, after login it shows some weird stuff (look below text). I'm unable to transfer files between the server and the local computer using scp co...
I installed the latest version of GCC 11.2V using conda, *conda install -c conda-forge* gcc" in my linux server (Centos7).
After I try to login into my server, after login it shows some weird stuff (look below text).
I'm unable to transfer files between the server and the local computer using scp command.
I couldn't understand what was wrong. How do I solve this error?
If I delete anaconda packages, will the issue be solved ?
Suggestions please.
INFO: activate-binutils_linux-64.sh made the following environmental
changes:
+ADDR2LINE=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-addr2line
+AR=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ar
+AS=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-as
+CXXFILT=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++filt
+ELFEDIT=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-elfedit
+GPROF=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-gprof
+HOST=x86_64-conda_cos6-linux-gnu
+LD_GOLD=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ld.gold
+LD=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ld
+NM=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-nm
+OBJCOPY=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-objcopy
+OBJDUMP=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-objdump
+RANLIB=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ranlib
+READELF=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-readelf
+SIZE=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-size
+STRINGS=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-strings
+STRIP=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-strip *ERROR*: This cross-compiler package contains no program
/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc *ERROR:*
activate-gcc_linux-64.sh failed, see above for details *ERROR:* This
cross-compiler package contains no program
/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc *ERROR:*
deactivate-gcc_linux-64.sh failed, see above for details INFO:
deactivate-binutils_linux-64.sh made the following environmental
changes:
-ADDR2LINE=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-addr2line
-AR=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ar
-AS=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-as
-CXXFILT=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++filt
-ELFEDIT=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-elfedit
-GPROF=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-gprof
-HOST=x86_64-conda_cos6-linux-gnu
-LD_GOLD=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ld.gold
-LD=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ld
-NM=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-nm
-OBJCOPY=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-objcopy
-OBJDUMP=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-objdump
-RANLIB=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ranlib
-READELF=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-readelf
-SIZE=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-size
-STRINGS=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-strings
-STRIP=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-strip INFO: activate-binutils_linux-64.sh made the following environmental
changes:
+ADDR2LINE=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-addr2line
+AR=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ar
+AS=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-as
+CXXFILT=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++filt
+ELFEDIT=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-elfedit
+GPROF=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-gprof
+HOST=x86_64-conda_cos6-linux-gnu
+LD_GOLD=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ld.gold
+LD=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ld
+NM=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-nm
+OBJCOPY=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-objcopy
+OBJDUMP=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-objdump
+RANLIB=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-ranlib
+READELF=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-readelf
+SIZE=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-size
+STRINGS=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-strings
+STRIP=/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-strip *ERROR:* This cross-compiler package contains no program
/home/sun/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc *ERROR:*
activate-gcc_linux-64.sh failed, see above for details
sunnykevin
(99 rep)
Apr 12, 2022, 08:04 PM
• Last activity: Aug 31, 2022, 04:23 PM
0
votes
0
answers
373
views
Running python as service in ubuntu
I am currently trying to run python as a service in ubuntu. I am running into an error when trying to run it as a service. This is what my service looks like: ``` [Unit] Description=PythonAPI [Service] Type=simple ExecStart=/User/path/anaconda3/envs/envs-name/bin/python3 /path/to/executable [Install...
I am currently trying to run python as a service in ubuntu. I am running into an error when trying to run it as a service.
This is what my service looks like:
[Unit]
Description=PythonAPI
[Service]
Type=simple
ExecStart=/User/path/anaconda3/envs/envs-name/bin/python3 /path/to/executable
[Install]
WantedBy=multi-user.target
When I try to run the service I get this error ModuleNotFoundError: No module named 'hosting'.
If I just run the ExecStart in the command line it seems to run no problem. Any reason why it wouldn't work in a service?
bob Ditusa
(1 rep)
Aug 16, 2022, 05:42 PM
1
votes
1
answers
350
views
which command returning undocumented things
I am trying to locate which `conda` executable I am using. For this, I want to use `which` command. As per man pages, it should return the path of the executable. Instead it returns some bash function (base) ➜ ~ which conda conda () { \local cmd="${1-__missing__}" case "$cmd" in (activate | deactiva...
I am trying to locate which
conda
executable I am using. For this, I want to use which
command. As per man pages, it should return the path of the executable. Instead it returns some bash function
(base) ➜ ~ which conda
conda () {
\local cmd="${1-__missing__}"
case "$cmd" in
(activate | deactivate) __conda_activate "$@" ;;
(install | update | upgrade | remove | uninstall) __conda_exe "$@" || \return
__conda_reactivate ;;
(*) __conda_exe "$@" ;;
esac
}
If I try to see the location of __conda_exe
, again I get another function:
__conda_exe () {
(
__add_sys_prefix_to_path
"$CONDA_EXE" $_CE_M $_CE_CONDA "$@"
)
}
where is the conda function I am using?
asdf
(111 rep)
Jul 1, 2022, 08:00 AM
• Last activity: Jul 2, 2022, 01:55 PM
Showing page 1 of 20 total questions