I tried to install seamsh 0.4.4(https://pypi.org/project/seamsh/) but counld not.
I spent a lot of time on it.
I needed gdal library to use seamsh.
So I installded it by conda because it was too complex to install it without conda.
But conda was not supported seamsh, so I don't know what to do.
Could you tell me how to install seamsh?
I use windows and vscode.
Thank you.
There's a pending PR to add it to Conda Forge. In the meantime, one can install it from PyPI. For example, try using the following environment:
seamsh.yaml
name: seamsh
channels:
- conda-forge
- nodefaults # only use conda-forge
dependencies:
## core software
- python=3.10 # set to preference
- pip
## libraries
- gdal
## Conda Python packages
- numpy
- scipy
- python-gmsh >=4.10 # used to ensure latest version
## PyPI Python packages
- pip:
- seamsh
Create with:
conda env create -n seamsh -f seamsh.yaml
At least on macOS, I'm seeing pip reinstall the Python gmsh package, despite the Conda Forge version being installed. Unsure why it isn't acknowledging the Conda version.
Related
I've a conda install that's giving me an install of pysal back on version 2.1.0 (it's currently 2.5.0) ... and I'm trying to figure out which of the 73 already installed packages has specified such an old version.
I know pydeps will find me the dependencies for a given package... all the packages required to run foo - but I want to go the other way: what packages need foo to be present (and the version they ask for would be nice.)
(I've got as far as recognising it's probably going to involve hunting through the json files in conda-meta)
you can use pipdeptree:
pip install pipdeptree
pipdeptree
and get the dependencies in a tree form, like:
flake8==2.5.0
- mccabe [required: >=0.2.1,<0.4, installed: 0.3.1]
- pep8 [required: !=1.6.0,>=1.5.7,!=1.6.1,!=1.6.2, installed: 1.5.7]
- pyflakes [required: >=0.8.1,<1.1, installed: 1.0.0]
ipdb==0.8
- ipython [required: >=0.10, installed: 1.1.0]
one of the packages has installed this version but probably, it does not depend on this specific version, so you can also try to just install the most recent version and test if it works.
Test and figure out dependencies is one of the reasons why we use virtual environments (like conda) so don't be afraid of break everything, if it happens, just save the env:
conda env export > your_env_name.yml
create the virtualenv again:
conda env create -f environment.yml
or just clone your current env to another before change it:
conda create --name current_env_name --clone backup_env
I am not able to install dependencies mentioned in requirements.txt (https://github.com/liuzhen03/ADNet) via pip install. It is being installed in some different path where a memory error is raised:
ERROR: Could not install packages due to an OSError:
[Errno 28] No space left on device
I want to install it only in my Conda environment. I tried
conda install --file requirement.txt
but still getting the same error as attached in the screenshot below.
Can someone help me sort this out?
Conda and PyPI packages don't necessarily use the same package names, so one can't simply feed Conda a pip freeze file and treat it like it came from conda list --export. However, Conda environments fully support Pip, so one can take two approaches.
Option 1: PyPI-only packages
One can use Conda's YAML environment specification to define the environment and Python version, and let Pip install the rest.
adnet.yaml
name: adnet
channels:
- conda-forge
dependencies:
# core
- python=3.7
- pip
# PyPI packages
- pip:
- -r https://github.com/liuzhen03/ADNet/raw/main/requirement.txt
The specification of Python 3.7 is because the scikit-image==0.16.2 specified in the requirements file is from 2019, so that seems like the appropriate Python to be using.
Option 2: Prefer Conda packages
The other option is to do a little work and see what packages are available through Conda, and source from there first. This has the advantage that all Conda packages are precompiled and you can add in stuff like specifying a BLAS implementation or CUDA version.
Basically, the only thing not on Conda is thop, and the two other packages Conda complained about, torch and opencv-python, go by the names pytorch and py-opencv in the Conda repository, respectively. So, a basic YAML translation would look like:
adnet.yaml
name: so-adnet-conda
channels:
- pytorch
- conda-forge
dependencies:
# core
- python=3.7
- pip
# specify blas or cuda versions here
# Conda packages
- imageio=2.9.0
- matplotlib=3.3.3
- scikit-image=0.16.2
- easydict=1.9
- pytorch=1.2.0
- torchvision=0.4.0
- pillow
- py-opencv >=4.0,<5.0
- tensorboardX=2.1
- tensorboard
- future
- lmdb
- pyarrow
# PyPI packages
- pip:
- thop
I am trying to create a conda package using conda build and a meta.yaml file. Most of the dependencies are handled just fine but some of them are causing issues. I know these packages all work together because I am using them in my dev environment.
My requirements section for the yaml file is as follows:
requirements:
build:
- setuptools
- numpy
- python >=3.6
- matplotlib
- rdkit
- openforcefield
- openeye
- networkx
- psi4
run:
- numpy
- python >=3.6
- matplotlib
- rdkit
- openforcefield
- openeye
- networkx
- psi4
All of the packages causing issues (see error below) are installable through conda, for example:
conda install -c psi4 psi4
conda install -c omnia openforcefield
conda install -c openeye openeye-toolkits
conda install -c rdkit rdkit
However when calling conda build . I get the following error:
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform linux-64: {'rdkit', 'openeye', 'psi4', 'openforcefield'}
I believe the rest of the .yaml is correct as there have been no errors raised with respect to anything else. Do I need to be more specific/use some special code for identifying package names? Or perhaps the issue is something else.
Thanks for any help.
I believe I have found the issue.
The above packages all come from different channels. Having added all of the channels I now get further through the build process. Channels are added with:
conda config --add channels <name of channel>
There may be an issue when it comes to distributing the package though. I think other people might have to add all the other channels as well.
I was lately trying to update all my Anaconda packages:
conda update conda
conda update anaconda
Some of them still were not updated, so I also did conda update --all.
Right now my conda version : 4.3.16, which seems to be the latest release. However, for some reason, matplotlib still has old version:
conda list
matplotlib 1.5.1 np111py35_0
According to the Anaconda changelog, it should be updated to 2.0 version: matplotlib from 1.5.3 to 2.0.0.
My installed python version is 3.5.2, if this matters.
UPD: Seems that spyder-app is blocking update because of problem with dependencies:
conda install anaconda=4.3.1
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda 4.3.1* -> spyder 3.1.2 py34_0
- spyder-app -> spyder 2.3.3
Use "conda info <package>" to see the dependencies for each package.
conda install matplotlib=2
UnsatisfiableError: The following specifications were found to be in conflict:
- matplotlib 2.0*
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> qt >=4.8.6,<5.0
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> sip >=4.16.4,<4.18
Use "conda info <package>" to see the dependencies for each package.
UPD2: Problem was solved by removing spyder-app:
conda remove spyder-app
conda update anaconda
Matlotlib was updated to the 2.0 version, among other updated packages. I also checked if Spyder IDE still works, and it still is able to run.
It probably is a dependency conflict. The anaconda package is just a meta-package that bundles packages, if some package can't be updated because of a package you installed (maybe requiring matplotlib < 2, or even indirectly by requiring a package and version that matplotlib depends on) then you probably can't install the newest version of the anaconda package. You could try to install the newest anaconda package (currently 4.3.1) yourself:
conda install anaconda=4.3.1
But you can also try to install a specific version of matplotlib manually and see what happens (there should be an instructive message if it can't install it because of dependencies):
conda install matplotlib=2
In your case it's spyder-app that is responsible. It's a deprecated package and not included in newer versions of anaconda so one possibility is to remove it:
conda remove spyder-app
and then try the update of anaconda or matplotlib.
Another way would be to create a new environment and then you can choose which environment to use when:
conda install -n mynewenvironment python=3.5 anaconda
and then use the new environment when you need matplotlib 2 and the old environment if you need spyder-app (and don't care about the matplotlib version).
I followed the answer in:
Anaconda - Install blpapi in environment
but could not comment because I don't reputation high enough. When I use conda install -c dsm/blpapi I get the following:
Fetching package metadata ...........
Solving package specifications: ....
UnsatisfiableError: The following specifications were found to be in conflict:
- blpapi
- python 3.5*
Use "conda info <package>" to see the dependencies for each package.
This is using a virtual environment with Python 3.5 installed. Any thoughts on why this works for Pythonic but not me?
There is no built package for python=3.5. If you look under the files section of the repo in the dsm channel you will see
linux-64/blpapi-3.9.0-py36_0.tar.bz2
win-64/blpapi-3.9.0-py27_0.tar.bz2
win-64/blpapi-3.5.5-py27_0.tar.bz2
linux-64/blpapi-3.5.5-py27_0.tar.bz2
Switching to Python 3.6 should get this to work.
did you try ? :
conda update --all
conda create -n py35 python=3.5
activate py35
conda install -c dsm blpapi=3.9.0
you can also download from :
https://www.bloomberglabs.com/api/libraries/
and put it in the repository of python 3.5 library
Since this question was posted, Bloomberg put the blpapi on conda-forge,
Which has more versions of the blpapi and python supported.
https://anaconda.org/conda-forge/blpapi