Comments (6)
Hmmm, this is a bug, but it can be avoided by not specifying thinc
in dependencies (since the pip installation of spacy
will overwrite the existing thinc
install). Why are you using spacy
from pip instead of from conda-forge?
Basically, what's happening here is:
conda-env
builds a new environment and first installs all the conda packages. This pulls inthinc=6.5.2
.conda-env
then installspip
packages, which results inpip
uninstallingthinc=6.5.2
and replacing it withthinc=6.10.3
frompypi
. But sincepip
did the uninstall, the metadata forthinc
is still in theconda-meta
directory (pip
doesn't play 100% well withconda
).conda-pack
packages the environment by reading in the metadata from theconda-meta
directory, which still includes the information forthinc=6.5.2
. It then crawls the directory and findsthinc=6.10.3
from pypi and also includes that.
We should filter the files found from collecting conda-meta
with those actually in the environment directory to catch issues of pip installs breaking stuff.
However, this can be avoided by having your pip
install never uninstall packages (in this case, remove thinc
from dependencies).
from conda-pack.
Thanks @jcrist for the explanation. Can I raise a PR with the fix for this? Agreed that this can be avoided by proactively pruning out conflicts from the environment.yaml itself, but with the environment already being created should the conda-pack fail fast for now in such case until the fix has been made to stop the user from packing the environment with incorrect set of packages?
from conda-pack.
Hmmm, this is a bit trickier than I originally thought. The main issue here is that manual changes to the environment may not change the total set of files, and instead just be small edits/replacement of individual files. In this case looking for missing conda files wouldn't catch these issues, as the sets would be identical. Instead we should check overwrites either by:
- Hashing the file and comparing to the hash in the conda metadata. This is further complicated because older versions of the metadata don't include file hashes.
- Looking at the hardlink status of the file to see if it still points to the package cache (only would work for files that are hardlinked, but would be faster than hashing).
This requires a larger refactor than I expected it would. You are welcome to work on it if you want, but it's not an easy problem. I'll probably have more time to work on this late next week.
from conda-pack.
Sure @jcrist . I realize this is a complicated problem. I'll wait for you to work upon it.
from conda-pack.
This should be fixed in #35.
from conda-pack.
Hi there, thank you for your contribution!
This issue has been automatically locked because it has not had recent activity after being closed.
Please open a new issue if needed.
Thanks!
from conda-pack.
Related Issues (20)
- Python crashes in unpacked environment on osx-arm64 HOT 4
- qt.conf keeps the absolute path HOT 1
- permission error in conda-unpack on windows 10 HOT 5
- CondaPackError: Files managed by conda were found to have been deleted/overwritten in the following packages HOT 2
- Conda pack does not work with Python 3.10 or 3.11 HOT 13
- `conda-unpack` cleanup prefixes not working HOT 1
- R/etc/ldpaths: No such file or directory HOT 3
- Permission error when packing to squashfs file on Linux HOT 2
- Lost my maintainer rights HOT 6
- Is it needed to run `conda-unpack` with squashfs ? HOT 2
- Deactivate script is deprecated and not available on mamba environments HOT 1
- Fix environment clobbered by pip by repairing conda-meta
- Add support for alternative compressors for mksquashfs
- [Governance] Access to Settings in this repo HOT 2
- conda-pack documentation is outdated
- Support for incremental migration of conda environments
- Conda-Managed Files Deleted or Overwritten HOT 2
- Absorb in `constructor` HOT 8
- Unversioned python in conda-unpack script shebang
- Unpacking to path containing whitespace does not work
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 conda-pack.