-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conda Virtual Environments? #167
Comments
There is an unmerged pull-request that adds Conda support. I've neglected it for too long already, so this is a good opportunity to re-address it: #108 The main thing is that I personally just don't know enough about Conda to evaluate this PR. It also needs tests. Do you think you can take a look at it and let me know what you think? |
Sure, I'm glad to take a look. As an anaconda user, I'm partial to conda for convenience. I'll look for the right dev branch and see if I can do some functionality testing at least. |
@Miserlou Is this currently in the "dev" branch? |
This is in the pull-request branch, not dev: https://github.com/mathieu1/Zappa/tree/conda_support |
Any update with this? :) |
Would be really interesting to know! |
One caveat: I did not use the latest version, so I did |
Update: upgraded to 0.39.1.dev, and can confirm issue #260 Sadly. :-( |
And to be more precise: "module initialization error: Attempted relative import in non-package" I use Flask 0.12 istalled via Conda main channel. |
Sorry, any update on using zappa with anaconda? Looks like there are still issues with this. Thanks. |
same... having some issues. this would be really great. |
Same here, conda environment is useful for windows users. It would be great to not have this issue. |
@Miserlou Any update on this? :-) |
upvoting. zappa/miniconda compatibility on, like any OS would be a huge help. |
Any news on this? or some status page we can follow? |
Any update on this? |
With the addition of Conda Pack it seems like this might be an option to get conda environment up? I suppose there will be complications if the conda environment was created on Windows and then tried to be unpacked into the Lambda env. |
I just set up a new conda env and the issue remains. |
Right now, |
It seems like this "hacky" solution works: |
I just tried using a conda environment to install both conda and pip packages. When doing a Has there been any update on fully adding support for conda environments? This would be very helpful to become a priority because it seems like many newer packages are opting to only release via conda channels and not pip. |
A question for conda users: Is this in the context of serving machine learning models on AWS Lambda? If so, I wrote a library called Thampi which uploads your model and your conda environment to AWS Lambda and abstracts away the DevOps part of model serving. The caveat is that your conda requirements file has to be manually written. Conceptually, you can work on Mac(Windows not tested, but seems possible) and This would not be possible without the amazing work of zappa. So thank you! |
This looks indeed the thing I was aiming for! Nice job! |
Upvoting this one for 2019! |
Hi there it seems to be possible to use Zappa with Conda by following these instructions : #1030 (comment) Apologies if I am missing the point of this issue. @Miserlou could you please give your opinion on whether or not this workaround is wise? |
I'll add in a request for support in 2019. Not having conda support makes the case for supporting zappa difficult :( |
As @johntiger1 says, its easy to fix. I just had to run the following command conda create -n zzz python=3.7
conda activate zzz
# Install required libraries, test your application
(zzz) ➜ which python
/home/lokesh/miniconda3/envs/zzz/bin/python
# Remove the /bin/python and copy the rest
export VIRUTAL_ENV=/home/lokesh/miniconda3/envs/zzz and it worked ! |
I'm sorry, I never used conda, so I'll need a bit of guidance on this one if we're going to get the support in. Can someone point me to a tutorial and either describe me the issues or point me to the comments on this thread that identify the still existing ones? |
@lokeshh if you can install zappa from master, can you check if the newly merged --no_venv option removes the need to export the VIRTUAL_ENV? |
@jneves No, it doesn't work. I ran the latest zappa from master. Here's the error message I got https://gist.github.com/lokeshh/ba6eac37748bff04b5f3bdd1b8d0779f |
can you specify the command? I would like to try it out! FYI for me the option exporting the virtual environment worked! |
|
Great project, btw! I see myself making liberal use of this.
I just wanted to check and see if there are any issues with using conda virtual environments? I successfully create a conda virtual environment (just flask and its dependencies), activate the new environment, and then maneuver to my project directory and then "zappa deploy project" where I have the zappa_settings.json configured correctly the best I can tell.
but then...
Also, unrelated, when specifying a domain should it be the same as the hostname in app.py? For example "www.abc.com". I have my domain up on Route 53.
The text was updated successfully, but these errors were encountered: