Comments (22)
Hi @fongangbatuo , this does not seem to have anything to do with the weave
package and this issue here. Your issue seems to be this one: conda-forge/basemap-feedstock#30 – apparently updating conda
or installing the package into a separate environment makes the problem go away.
from weave-feedstock.
I believe it's reasonable to close this issue as stale.
from weave-feedstock.
@tpdownes, weave
is only available for python2.7, it looks like you have python3.7.2, can you try again with 2.7.15 and see if that works.
from weave-feedstock.
I should have reported that I ran conda install python=2.7 weave
for that reason. bsddb
literally doesn't exist in conda-forge
and the toolchain only exists with a particular tag. bsddb3
claims 2.x and 3.x compatibility (thus providing a path for weave
on 3.x?). Full set of commands here:
$ conda create -n testy
$ conda activate testy
$ conda config --env --remove channels defaults
$ conda config --env --add channels nodefaults
$ conda config --env --add channels conda-forge
$ conda config --env --add channels conda-forge/label/gcc7
$ conda install python=2.7 weave
Collecting package metadata: done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- weave -> bsddb
- weave -> toolchain_cxx_linux-64
from weave-feedstock.
In general the conda-forge
channel depends upon the defaults
channel, so they should be used together.
from weave-feedstock.
@tpdownes,
weave
is only available for python2.7, it looks like you have python3.7.2, can you try again with 2.7.15 and see if that works.
It's interesting that conda list
reports the version of Python from base
if none is in the present environment.
from weave-feedstock.
Thanks @tpdownes for bringing this up and @duncanmmacleod for looking into it. I was indeed under the impression that the defaults
packages where a given that we can build upon in conda-forge
, but re-reading the conda-forge documentation it quite clearly states "Only in extreme cases should you rely on a dependency outside of conda-forge". I don't think this is the case here (actually, weave
works fine without bsddb
it just becomes very slow after a while when you use it a lot). I'll have a look into this.
from weave-feedstock.
@mstimberg, immediately below that statement it says:
In these cases, the basic heirarchy for dependencies, in order of preference, is,
- Make or use a conda-forge package for the dependency
- Use a defaults package for a dependency
...
So I think its implicit that defaults
is fine, but perhaps @conda-forge/core can comment?
from weave-feedstock.
Yeah, 2 is meant for compilers and run times, etc. If you can add the dep to conda-forge, you should.
from weave-feedstock.
Thanks @scopatz.
from weave-feedstock.
Hmm, bsddb3
should still be Python2-compatible, but the conda-forge
package skips the Python 2 build. I'll have a look at whether it is a trivial change to get Python 2 packages for bsddb3
.
from weave-feedstock.
FYI: it's not clear to me that bsddb3
is a direct replacement in the sense of allowing import bsddb
to work.
Isn't bsddb
simply a part of Python 2 runtime? If so -- and weave
is limited to python 2 in the first place -- do you even need the dependency?
Update: does look like the bsddb
package has a real binary in it.
miniconda3/pkgs/bsddb-1.0-py27_1/
├── info
│ ├── files
│ ├── has_prefix
│ ├── index.json
│ ├── LICENSE.txt
│ ├── meta.yaml
│ ├── platform
│ ├── recipe
│ │ ├── build.sh
│ │ ├── meta.yaml.template
│ │ ├── run_test.py
│ │ └── setup.py
│ └── repodata_record.json
└── lib
└── python2.7
└── lib-dynload
└── _bsddb.so
I don't know the licensing of the recipe, but it looks straight forward to introduce bsddb
to conda-forge
.
from weave-feedstock.
bsddb
can be part of the Python standard library, but I think Python needs to be explicitly compiled with bsdb support for that. The Python version on Anaconda/conda-forge does not do that, so that's why bsddb
exists as a separate module. I think it is supposed to be deprecated for now, and replaced by bsddb3
. It's indeed not a drop-in replacement, you'll have to do something like import bsddb3 as bsddb
. On the other hand, weave
does not use bsddb
directly, it only uses the shelve
package which can use various database backends under the hood. Not quite sure whether this will automatically use bsddb3
when it is installed. Also not sure it's worth spending much time on all this, given that Python 2 will be deprecated by the end of the year... Maybe bringing bsddb
into conda-forge
would indeed be the easiest solution.
from weave-feedstock.
Besides bringing bsddb
to conda-forge
, another (easy-ish) solution would be to use the new run_constrained
feature in conda 4.4+ that allows the listing version constraints on other packages that have to be manually installed. Then, you could install weave
from conda-forge
, but you'd have to enable defaults
to install bsddb
.
https://github.com/conda/conda/blob/master/CHANGELOG.md#new-feature-highlights-2
I agree that this isn't the end of the world and if you elect to do nothing that's not unreasonable.
from weave-feedstock.
Yeah, run constrained isn't unreasonable
from weave-feedstock.
@scopatz what is the license for the bsddb
recipe from defaults? I see a lot of PSF in the recipe, but assume that it is about the code rathe than the recipe.
from weave-feedstock.
I'm not sure run_constrained
is what we want, we'd rather need run_if_available
, i.e. if the bsddb
package is available from somewhere, then it should be installed. With run_constrained
the user would have to manually install bsddb
, I don't see how it would change anything here compared to not specifying it as a dependency at all.
But then, as I said before, weave
works without bsddb
, it just becomes slow after a while (its on-disk cache for previously compiled files uses a "dumb database" that becomes very slow for many files).
from weave-feedstock.
@tpdownes - I am not familiar. If you have a link I can take a look
from weave-feedstock.
I'm looking at the pkgs/bsddb-1.0-py27_1
directory after installing it from defaults
. This looks like it.
from weave-feedstock.
I think that might be a typo for PSL, ie the Python Software License.
Also I think adding the package to conda-forge is the best solution, though others might work
from weave-feedstock.
Well, actually (tongue in cheek) I believe it's the PSFL. :)
I'm willing to take on (or work with one of my colleagues) to get bsddb
into conda-forge
since I might as well do it myself one of these times. You can consider this my problem, although not one I'll solve in next week or two.
from weave-feedstock.
i get this Error when i try importing Basemap(how may i correct the installation?)
from weave-feedstock.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weave-feedstock.