Qiime2 installation from pre built yaml file into conda environment doesnt work because of genomeinfodbdata package, how to fix? - anaconda

When installing the newest qiime2 version (2022.8) into a conda environment with the given yaml file on the official qiime2 website. The installation gives an error which has something to do with the genomeinfodbdata package.
I tried updating my conda environment and using other genomeinfodbdata versions. But it didnt work.

I Posted the question because it took some time testing and wanted to spare you guys the trouble. This was my fix. This problem happend on a linux distribution.
You should indeed also update the conda environment.
So in the give qiime2 .yml file on https://docs.qiime2.org/2022.8/install/native/#install-qiime-2-within-a-conda-environment there exist a package which gives trouble.
Go into the yml file and remove the following package/line from the file before making an conda environment of it:
bioconductor-genomeinfodbdata=1.2.7
After making the environment you have to manually add the package with:
conda install -c bioconda bioconductor-genomeinfodbdata
This will install the same version but without the extra problems.

Related

Could not load dynamic library 'libcudart.so.11.0' in conda enviroment

I use the conda comment to install tensorflow:
conda create -n tf2.6 python=3.9
conda install tensorflow-gpu=2.6
The log tells me it was succesuflly installed.Then in python when I import tensorflow, it shows Could not load dynamic library 'libcudart.so.11.0'. From the log, I found it installed cudatoolkit and cudnn when installing tensorflow. In the directory ./tf2.6/lib, there exist libcudart.so and libcudart.so.11.0. why python cannot recognize it? Some one can give some suggestions. Thank you very much.
In my conda env, there was another version tf2.5. It can work perfectly but I forgot how to installed it since it is a long time when I installed it.
I have the exact same problem, I have found a temporary solution as of now,
doing export LD_LIBRARY_PATH="$CONDA_PREFIX/lib" after activation will include libcudart.so.11.0
If you want to automate it,
add this to env-prefix/etc/conda/activate.d/env_vars.sh
#!/bin/sh
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib"
This will run the script on conda activate and set LD_LIBRARY_PATH

How to Fix Entry Point Not Found while installing libraries in conda environment

I'm working on Anaconda by making multiple environments in it. I have made an environment camelot and now I want to install different libraries in this environment. So for example to install pandas in this environment,
I'm writing:
conda install pandas
or
conda install -c conda-forge camelot-py
Then it gives me this error:
python.exe-Entry Point Not Found
The procedure entry point OPENSSL_sk_new_reserve could not be
located in the dynamic link library.
C:\Users\abc\Anaconda3\Library\bin\libssl11_-x64.dll
First I thought it may be because of the environment variable, thus I set an environment variable for Python, but this did not resolve the issue.
as it is suggested in here I could solve this problem by copying libssl-1_1-x64 dlls in Anaconda/DLLS to Anaconda/Library/bin (probably replacing it)
I got the same issue while updating Anaconda navigator, and got it over by replacing the file libssl-1_1-x64.dll in Anaconda3/Library/bin with the one from Anaconda3/DLLs.
As mentioned by an Anaconda maintainer here ...
moving libssl dlls around like that is really not advisable. Those
DLLs are duplicated because you have something fishy going on in your
packages. There should not be any openssl DLLs in the DLLs folder.
They should be in Library/bin
By looking at the JSON files in the conda-meta directory I found out that DLLs\libssl-1_1-x64.dll was installed by the python 3.7.0 package, and Library\bin\libssl-1_1-x64.dll was installed by the openssl package. After further investigation I found out that Python 3.7.0 does not install OpenSSL as a separate package, but Python 3.7.1 (and later) does.
Typically upgrading Python goes as expected, but if you somehow end up with both python 3.7.0 and openssl packages installed simultaneously there will be two libssl-1_1-x64.dll files and your Anaconda distribution will be broken. (You can easily verify this with the conda list command.)
I think the best way to fix it is therefore:
Rename Library\bin\libssl-1_1-x64.dll to Library\bin\libssl-1_1-x64.dll.org (your are going to need it later.)
Copy DLLs\libssl-1_1-x64.dll to Library\bin\libssl-1_1-x64.dll
Update Python to version 3.7.1 or higher, for instance with conda update python. This will remove the DLLs\libssl-1_1-x64.dll file.
Delete the current Library\bin\libssl-1_1-x64.dll file.
Rename Library\bin\libssl-1_1-x64.dll.org back to Library\bin\libssl-1_1-x64.dll. This is necessary because I got HTTP errors in the next step otherwise.
Reinstall OpenSSL with conda install openssl --force-reinstall to ensure it's up to date again.
I had the exact same issue, and it also just started today. Kind of destroyed my entire work day, tbh...
I accidentally did a conda install ... in my base environment, and it updated conda and a handful of other modules. (Conda went from 4.5.12 to 4.7.10, in my case.) Anyway, after I rolled it back, things are working as expected again.
If this is what's causing your issue, here's a fix.
conda list --revisions
conda install --revision 1 (In my case "rev 1" was my most recent, stable base environment.)
(More details about this: https://sriramjaju.github.io/2018-05-30-2-minute-recipe-how-to-rollback-your-conda-environment/)
Now I'm worried that I've inadvertently configured something in a way that isn't compatible with the newest version of conda.
Edit: Don't follow this last suggestion if you're doing anything other than playing around in a conda environment to test-drive modules. See this and this.
Lastly, if you really need to install modules and do some work ASAP, pip install [module name] was still working for me before I thought to do the reversion thing.
My problem was same. I just uninstalled anaconda, and install it again. And the problem solved.
I was receiving the same following error while updating spyder and conda package.
python.exe-Entry Point Not Found
The procedure entry point OPENSSL_sk_new_reserve could not be
located in the dynamic link library.
C:\Users\abc\Anaconda3\Library\bin\libssl11_-x64.dll
solution:
I did replace libssl-1_1-x64 dlls from Anaconda/DLLs to
Anaconda/Library/bins as suggested here.
Before opening Anaconda Navigator desktop app, I updated conda in Anaconda Prompt using conda update conda. conda successfully updated.
Then I have updated spyder using conda update spyder command in
Anaconda Prompt. spyder updated and running successfully.
For those still having similar issues with libssl11_-x64.dll or other .dll files:
Use pip install instead if you can!
I had the same issue today with libcrypto-1_1-x64.dll when trying to install plotly using
conda install -c plotly plotly
This prompts a downgrade for anaconda, and in turn raises the error:
OPENSSL_sk_new_reserve [...] libcrypto-1_1-x64.dll
Instead, using for example
pip install plotly==4.1.0
works like a charm!

"conda install pandas-datareader" not working

I am trying to install pandas_datareader in Anaconda prompt by running the following command as per the official documentation:
conda install -c anaconda pandas-datareader
I am getting the error - "Solving environment : Failed" as shown below
I am connected to internet.
I found some links which said I needed to downgrade my Conda AND Python versions, so I tried that too, but it again says "Solving environment : Failed"
Also tried running the following command in Anaconda prompt,
pip install pandas_datareader
and it gave the error:
Could not find a version that satisfies the requirement pandas_datareader (from versions: )
No matching distribution found for pandas_datareader
Can someone please help here?
Config Details
Conda version : 4.5.12
Python version : 3.7
OS : Windows 10
PyPI Installation
The correct line for installing with PyPI is
pip install pandas-datareader
Note that the package name uses a hyphen (pandas-datareader), which is different from the underscore (pandas_datareader) that is used when importing.
Conda Installation
It's hard to answer this outright without more information. Other Windows 10 users who are behind proxies have reported the same error on Issue #764, which includes potential solutions.
Changing Python Version? No
I am skeptical that you would need to downgrade Python. You can easily test whether this is true without having to actually do it. Namely, if you really did need to change your Python version, then the following command would correctly solve the environment:
conda create --dry-run -n test-pd-dr anaconda::pandas-datareader
whereas this one would fail:
conda create --dry-run -n test-pd-dr python=3.7 anaconda::pandas-datareader
I expect they'd both fail. The first one attempts to create any environment with the only constraint being that it include pandas-datareader, whereas the second one additionally adds the constraint to use the same Python minor version you report. If they both fail, it's something else.
Also, changing Python versions is base env is risky (it can break your Conda if done incorrectly) and requires following specific directions from Anaconda.
Use the following command in Conda Prompt:
conda install -c anaconda pandas-datareader

Conda hangs in "solving environment" when installing STSci packages

I run Ubuntu 18.04.1 LTS on a virtual machine on Windows 10. I've installed Anaconda 5.3 without any issues, but when I try to install an STSCI environment with the command line:
conda create -n astroconda stsci
the terminal gets stuck in "Solving Environment" (I have version 4.5.11 of conda). Yesterday I waited for about 4 hours before giving up. I would like to know if there is a known issue about this problem and if it can be related to the quantity of disk and RAM assigned to the virtual machine.
I will write a more general solution, to Conda's "Solving Environment" issue, which I had the uttermost pleasure with.
Short answer of things to try:
As already mentioned try updating Conda with conda update conda or even better, the whole base environment conda update --all.
Specify package and build version using <package>=<version>=<build> e.g. sage=8.3=py27_3. Search available versions by conda search <package>.
Like for the package, you can also specify python version and ideally some other dependencies. Check dependencies with conda info <package>.
Check current configuration inside the .condarc file or with conda config --get and check if you maybe have additional restrictions, as normally you will only find the channels defined there.
When working with additional channels put conda-forge or the channel you want to use on top and add channel_priority: strict. So your .condarc file would look like this:
channel_priority: strict
channels:
- conda-forge
- defaults
Contrariwise to the above, remove the first line and try adding --no-channel-priority to the command. This one helped me a couple times since updating to Conda 4.6.
If above does not work:
When conda seem stuck it is possibly having too many options or some conflicts resulting in the SAT solver getting clause counts of multiple millions.
To check if this is the case add -vv or --debug and you will later see lines like Invoking SAT with clause count: XXX. If it stays at one of these lines for long time, then try specifying version for packages as above. If there seem another issue, try the conda GitHub.
Another useful tip if you are using the conda-forge channel, is to go over their Tips & tricks.
I have the same problem on macOS 10.13.6.
The creation of iraf environment
conda create -n iraf27 python=2.7 iraf-all pyraf-all stsci
works fine instead.
Update: I found out that specifying the python version
conda create -n astroconda python=3.6 stsci
makes the installer work also with astroconda.
I had the same issue but then I updated Conda and it worked...
$ conda update conda

zipline installation from Quantopian modifies Anaconda

I am working with Anaconda with python 2.7. In order to do algorithmic trading I wanted to install 'zipline' package using conda giving command as
conda install -c Quantopian Zipline
from Anaconda prompt. After 'Solving environment' message, I got 'Package Plan' which contains packages which will be installed, removed, updated and downgraded. I was astonished to see that it will remove 'anaconda: 5.2.0-py27_3' and downgrade
networkx: 2.1-py27_0 to 1.11-py27_1;
numpy: 1.14.3-py27h911edcf_1 to 1.11.3-py27hc42714f_10;
numpy-base: 1.14.3-py27h917549b_1 to 1.11.3-py27h2753ae9_10;
pandas: 0.23.0-py27h39f3610_0 to 0.22.0-py27hc56fc5f_0.
I canceled the installation.
I have a couple of question here.
Why at all it is necessary for any package installation to remove package 'Anaconda' and downgrade packages like 'numpy', 'pandas' etc.?
Will this action not jeopardize my other python activities?
Shall I go ahead or restrain from installing the packages like this?
Zipline doesn't currently support the latest versions of packages like panda, numpy etc. which causes the messages above.
Well, yes it could make trouble, especially if your other python activities need the latest version of those packages.
Please don't go ahead with the installation like this. I'll explain the best available solution below.
Solution:
Create an environment for Zipline. Let's say (for convenience only) Zipline supports Python 3.5 but you have only installed Python 2.7 on your machine.
So you can create a sandbox-like conda-environment for Python 3.5. It's very straight forward, just use the following commands:
$ conda create -n env_zipline python=3.5
After your isolated environment called env_zipline was created, you have to activated it by using the following command:
$ activate env_zipline
You can install Zipline now by running
(env_zipline)$ conda install -c Quantopian zipline
When you finished your work with zipline you can deactivate the environment for zipline by using the following command:
(env_zipline)$ deactivate
Hope it helps. If your need further information you can check the more detailed documentation of zipline (the steps above are included):
http://www.zipline.io/install.html

Resources