chdoig / conda-auto-env Goto Github PK
View Code? Open in Web Editor NEWAutomatically activate a conda environment when entering a folder with an environment.yml file
License: BSD 3-Clause "New" or "Revised" License
Automatically activate a conda environment when entering a folder with an environment.yml file
License: BSD 3-Clause "New" or "Revised" License
Hi,
First, let me congratulate you for this great tool ๐
I'm using MacOSX 10.12 at work and once I cd /path/to/my/python2/only/environment
and try to import numpy
which is not installed so these lines below behave as I expected :
/path/to/my/python2/only/environment : $ python -c "import numpy"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
If I want to come back to my original environment (where numpy
is already installed) with source deactivate
I still get the same error :
/path/to/my/python2/only/environment : $ source deactivate
/path/to/my/python2/only/environment : $ python -c "import numpy"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
If I cd ..
or just cd
and then type source deactivate
, then the $ python -c "import numpy"
works fine.
Can you have a look ?
This doesn't work.
A step is missing from your instructions for me I had to add the following to requirements.yml
name: something
As soon as I did that it worked.
Cheers
Hey Christine,
This isn't an issue per se, just wanted to say I tried this on Ubuntu Linux and it works awesome ๐. Thanks for putting this together!
Cheers,
Eric
Thanks for this script! Had been working great for me with the exception of one repository. Entering via the terminal kicked off the correct creation of the environment. However, once created, the conda_auto_env
script failed to find it. So it would again try to create it, but conda would warn that the env already exists. This cycle would continue.
Some digging lead pointed to the line endings of the environment.yml
file. The problematic repository had windows-based line endings.
> cat -e environment.yml
name: SampleName^M$
dependencies:^M$
- python=3.10^M$
- pip=22.1^M$
Repositories that worked fine had unix endings:
> cat -e environment.yml
name: AnotherSampleName$
dependencies:$
- python=3.9.5$
- bokeh=2.3.2$
From my brief exploration, it appears this line:
conda-auto-env/conda_auto_env.sh
Line 19 in 0ab80fa
We are trying to use conda-auto-env with Windows 7 and Anaconda 5.0, but we do not find the .bashrc or .bash-profile since we do not have a "bin" folder in our Anaconda main installation folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.