Skip to content
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

Installation From Conda #650

Closed
rajpratyush opened this issue Feb 2, 2021 · 25 comments
Closed

Installation From Conda #650

rajpratyush opened this issue Feb 2, 2021 · 25 comments
Assignees
Labels
enhancement New feature or request

Comments

@rajpratyush
Copy link

rajpratyush commented Feb 2, 2021

Is your feature request related to a problem? Please describe.

While I was browsing through the docs I found out that there isn't any instructions regarding how to install the graspologic library in conda environment. As sometimes installing via pip in conda environment causes an environment error( as it is in the case of streamlit) so a separate set of instructions for installing graspologic through conda is highly appreciated.

Describe the solution you'd like

As earlier we were able to install graspy in conda through the conda-forge option. So I was wondering if we could add instructions to install graspologic in conda wither via conda forge or by creating a virtual environment it will be better for users.

Describe alternatives you've considered

Instructions to install Graspologic either by virtual env or by conda forge

Provide references (if applicable)

Here is the instrcutions on how to install graspy via conda forge.

https://anaconda.org/conda-forge/graspy

Additional context

Add any other context or screenshots about the feature request here.

@rajpratyush rajpratyush added the enhancement New feature or request label Feb 2, 2021
@bdpedigo
Copy link
Collaborator

bdpedigo commented Feb 2, 2021

I think adding graspologic to conda forge is a good idea if someone wants to do it.

One additional issue is that we'd want to set up a way for new releases to also be pushed to conda-forge just like they are automatically for PyPI

@rajpratyush
Copy link
Author

yesss @bdpedigo as most of devs prefer to work in conda so it would be good if we add graspologic to conda-forge

should i look more into this matter??

@bdpedigo
Copy link
Collaborator

bdpedigo commented Feb 2, 2021

absolutely, you're welcome to. agree that having conda-forge feedstock would be nice but like I said I would mostly want to do this if we can figure out some kind of continuous integration for updating the feedstock.

@rajpratyush
Copy link
Author

lemme have a look at this @bdpedigo

@daxpryce
Copy link
Contributor

daxpryce commented Feb 2, 2021

I'm certainly not against this, but please keep in mind that we're going to have to make sure our downstream dependencies are there too. Most are probably there, but the ones that JHU has written and graspologic-native may not be (def. not in the latter case, because I didn't do that). If it's as simple as twine uploading to a different location that's fine - maybe instead of treating this as a code / PR thing you just treat it as a fact finding mission and I'll go through the process of setting up an account with conda forge and whatnot?

In the meantime, I'll verify that it does indeed need to be me or another MSFT employee that owns the account we publish through!

@rajpratyush
Copy link
Author

@dwaynepryce I understand the situation, if you can list out the current dependencies of the graspologic I can cross check if they are avilable on conda-forge or not or are they available through a new channel. meanwhile i shall also test if installing by creating a virtual environment though pip in conda works or not.

@rajpratyush
Copy link
Author

rajpratyush commented Feb 4, 2021

@bdpedigo @dwaynepryce I have found how to setup a CI pipeline for continuous integration to update the feedstock there are actually 2 repositories which with which we can setup this

  1. First we need to stage our package through this repo
    https://github.com/conda-forge/staged-recipes

  2. we need to stage the CI pipeline for our feedstock but since I don't have much that deep idea into devops i could not understand which of these two repositories will be used to setup the CI pipeline

https://github.com/conda-forge/conda-forge-ci-setup-feedstock

https://github.com/conda-forge/conda-smithy

so I would appreciate if you can guide me through this

@daxpryce
Copy link
Contributor

daxpryce commented Feb 4, 2021

I'll take a look into this today!

@daxpryce
Copy link
Contributor

daxpryce commented Feb 5, 2021

Hrm. It sounds like it's not as self-serve as pypi (in that we'll have to push the recipe to that repo and create a PR and a human will validate and merge it eventually). That can certainly be done, but I wouldn't want to do it for all our dev, non-release builds, and it also sounds like sometimes PRs fall through the cracks and we have to manually ask them to look at it to put it back on their radar. I think we can make that work but given all of these non-automatic processes, I'm not going to commit to saying we should do conda forge as a first class citizen. Best effort, sure, but it's a pretty heavy onerous lift compared to our fully automated deployment process to pypi.

Still, we can give it our best effort and try to stay on top of all PRs into conda-forge. It would be nice if we could identify a cadre of conda users who could focus on shepherding this through each time we do a release.

Something to keep in mind is that we haven't even released a final build yet - we're still releasing with dev tags to PyPI. We're basically ready for 0.1.0, but we need to write up some release notes and do a final scan of things before we do it (#653 is the sort of thing we should have fixed before we tell people to use us with a 0.1.0 release).

The good news is that tracking down things like #653 gives us some time to get this working for conda as well. We are going to have to do the same with graspologic-native - and do it first, prior to doing it with graspologic.

I'm not going to be able spend much time on this this week, but I will send the current dependency list from a fresh venv in a few minutes and respond back with that too.

@rajpratyush
Copy link
Author

rajpratyush commented Feb 5, 2021

yess that's true even i was reading and asking Devs among my community but we can surely add instructions to install it in conda environment by means of virtual environment as that one works @dwaynepryce

@daxpryce
Copy link
Contributor

daxpryce commented Feb 5, 2021

we can absolutely add instructions for that - we need to add wiki pages for a number of things, actually, and this sounds like a perfect example of one!

Here's our current dep list:

(gp-venv) dwayne@cloudship tmp: $ pip list
Package            Version
------------------ ------------------
anytree            2.8.0
cycler             0.10.0
Cython             0.29.21
decorator          4.4.2
gensim             3.8.3
graspologic        0.1.0.dev531201433
graspologic-native 0.1.0
hyppo              0.1.3
joblib             1.0.0
kiwisolver         1.3.1
llvmlite           0.35.0
matplotlib         3.3.0
networkx           2.5
numba              0.52.0
numpy              1.20.0
pandas             1.2.1
Pillow             8.1.0
pip                19.2.3
POT                0.7.0
pynndescent        0.5.1
pyparsing          2.4.7
python-dateutil    2.8.1
pytz               2021.1
scikit-learn       0.24.1
scipy              1.6.0
seaborn            0.11.1
setuptools         41.2.0
six                1.15.0
smart-open         4.1.2
threadpoolctl      2.1.0
umap-learn         0.5.0

@daxpryce
Copy link
Contributor

daxpryce commented Feb 5, 2021

@rajpratyush are a set of instructions for creating a virtualenv in conda and installing it something you can put together? I don't ever use conda, so I'm not the best person to put something like this in place if we want it to be accurate ;)

@rajpratyush
Copy link
Author

@dwaynepryce sure I can do it. Can you assign me this issue ?

@rajpratyush
Copy link
Author

@dwaynepryce I have tested that installing graspologic though virtual environment in conda via pip works well without any issue. please tell me where to put these instructions now

@daxpryce
Copy link
Contributor

daxpryce commented Feb 8, 2021

https://github.com/microsoft/graspologic/wiki/FAQ can you edit that wiki? If not, post it in markdown in this issue and I'll put it in that wiki page :)

@rajpratyush
Copy link
Author

@dwaynepryce I can do them both just tell me the files associated with it

@daxpryce
Copy link
Contributor

daxpryce commented Feb 8, 2021

It's actually just the edit button in the page - upper right hand corner.

Can you see the edit button like in this screenshot? Screen Shot 2021-02-08 at 10 54 24 AM

@rajpratyush
Copy link
Author

@dwaynepryce No its not visible here in my forked repo

@daxpryce
Copy link
Contributor

daxpryce commented Feb 9, 2021

Ah yes, it won't show on forked repos - it would be in this repo / project specifically.

let's just do this: put the instructions in a response to this ticket in a code block and I'll copy/paste them in for you, then we should be good!

@rajpratyush
Copy link
Author

Surely I will add do it tommorrow in morning itself @dwaynepryce

@rajpratyush
Copy link
Author

Step 1: Check if conda is installed in your path.

conda -V

Step 2: Update the conda environment

conda update conda

Step 3: Set up the virtual environment

  • Type conda search “^python$” to see the list of available python versions.
  • Now replace the envname with the name you want to give to your virtual environment and replace x.x with the python version you want to use.

conda create -n envname python=x.x anaconda

Step 4: Activating the virtual environment

  • To see the list of all the available environments use command conda info -e
  • To activate the virtual environment, enter the given command and replace your given environment name with envname

conda activate envname

Step 5: Installation of required packages to the virtual environment

  • Type the following command to install the graspologic package to the environment and replace envname with the name of your environment.

pip install graspologic

Step 6: Deactivating the virtual environment

  • To come out of the particular environment type the following command. The settings of the environment will remain as it is.

conda deactivate envname

@rajpratyush
Copy link
Author

@dwaynepryce here you go

@rajpratyush
Copy link
Author

rajpratyush commented Feb 10, 2021

@dwaynepryce regarding wiki we should also add this in it.
error in installing graspologic due to llvmlite

@daxpryce
Copy link
Contributor

Agreed, I just didn't want to do it until I had instructions for 3.9 for windows, mac, and linux. Blergh.

Regardless, instructions for installation from conda are now included on the wiki! Thank you @rajpratyush!

@rajpratyush
Copy link
Author

@dwaynepryce I can test that and work on it if you want to check installation issues due to llvmlite on python 3.9 furthur I think we might get errors in running graspologic is the hyppo version is > 0.13 specifically at version 0.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants