Open evanseitz opened 5 years ago
Your procedure unfortunately is very loose. That makes it fragile over time. I can't fix it all for you, but here's some advice:
-c anaconda
. This has the same content as the defaults channel, but loses priority within that channel.conda create --no-default-packages -c conda-forge -n ManifoldEM python=2.7 mayavi matplotlib scipy mrcfile scikit-learn h5py pillow satra::vtk pandas opencv menpo::imageio psutil numpy pango mpi4py
when you get this working, you should create "lock files" to use next time you just want to install the same environment. https://github.com/mariusvniekerk/conda-lock/blob/master/conda_lock.py Re-lock with your original list of deps if you want to update the lock file.
Note: I have not tested the above at all. It should be a step in the right direction, but it may not work without a bit more work.
Thank you @msarahan for this very clear picture. I'll move forward with your advice in mind.
When you get it working, you should consider making a conda package for your software and adding your recipe to conda forge. That will make maintenance much easier for you in the future. The info on https://conda-forge.org/ should help you get started.
Hi @msarahan - I've made several attempts to create the lock methods using the repository you've so kindly recommended. However, I must be making a mistake somewhere in my logic; I'm doing the following on Linux:
conda_lock.py
file on my local system#! /Users/.../bin/python
(taken from which python
)chmod 755 conda_lock.py
conda activate FOO
and creating a .yml file for it via conda env export > environment.yml
(which now resides in the same directory as conda_lock.py
... then deactivating environmentpip install pathlib
on the conda base
(the script will fuss if not)./conda-lock.py -f environment.yml -p osx-64 -p linux-64
as directed in the readmeAt this point, I'm getting the error:
TypeError: expected str, bytes or os.PathLike object, not dict
ees2192@midway:~/conda-lock-master> ./conda_lock.py -f environment.yml
generating lockfile for osx-64
Traceback (most recent call last):
File "./conda_lock.py", line 107, in <module>
platforms=args.platform or DEFAULT_PLATFORMS,
File "./conda_lock.py", line 64, in make_lock_files
platform=platform, channels=channels, specs=specs
File "./conda_lock.py", line 37, in solve_specs_for_arch
json_output = subprocess.check_output(args, encoding="utf-8", env=env)
File "/home/ees2192/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/home/ees2192/anaconda3/lib/python3.6/subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/ees2192/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/home/ees2192/anaconda3/lib/python3.6/subprocess.py", line 1275, in _execute_child
restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not dict
I should note that this happens in different flavors when I remove one of the -p arguments
or all of them from ./conda-lock.py -f environment.yml -p osx-64 -p linux-64
.
I've been having considerable trouble installing an environment on numerous machines / OS (libraries listed below). On some systems, everything works fine (such as openSUSE 15.1, macOS mojave, and Ubuntu 16) while on Ubuntu 18 I get back an error at the end telling me there's "no module named numpy"... however
conda list
shows numpy there.Here's the exact procedure:
I also tried installing an old .yml I was using on this same machine (after scrapping the above env) and it installed successfully, but then I got a different error on running python script:
undefined symbol: g_log_structured_standard
I then scrapped that environment and pasted the anaconda folder from a previous machine into this OS... and everything worked perfectly.
All in all, something has definitely changed in the backend conda libraries (for instance, I used to use
conda install vtk=6.3
which no longer works)... and I'm pretty desperate to get a reliable environment for an upcoming release.thank you so much for your time.