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

Add pyEPR to the Anaconda cloud #38

Closed
DanielCohenHillel opened this issue May 9, 2020 · 20 comments
Closed

Add pyEPR to the Anaconda cloud #38

DanielCohenHillel opened this issue May 9, 2020 · 20 comments
Assignees

Comments

@DanielCohenHillel
Copy link
Collaborator

Right now to install the pyEPR package you need to clone it and add it to the environment variables. I think it would be much simpler if we add pyEPR to the Anaconda cloud, this way to download the package all you need is to run something like conda install -c minev pyEPR and you're done. The upload process isn't that long and all you need is a free anaconda account. Here is the documentation on how to do so

@zlatko-minev
Copy link
Owner

Ok, I'll set up an account on anaconda.

@zlatko-minev zlatko-minev self-assigned this May 9, 2020
@zlatko-minev
Copy link
Owner

Ive been trying to do it like this with meta.yaml but right now the data isnt't even finding the version ...

{% set data = load_setup_py_data() %}

package:
  name: pyepr-quantum
  version: {{ data['version'] }}

build:
  number: 0
  script: python setup.py install --single-version-externally-managed --record=record.txt

requirements:
  build:
    - python
    - setuptools
  requirements:
    run:
      {% for req in data.get('install_requires', []) %}
        - {{ req }}
      {% endfor %}

test:
  imports:
    pyEPR

about:
  home: {{ data['url'] }}
  license: {{ data['license'] }}
  license_file: LICENSE
  summary: {{ data['description'] }}
  description: >
    pyEPR is an open source, BSD-licensed library providing high-efficiency,
    easy-to-use analysis functions and automation for the design of quantum
    chips based on superconducting quantum circuits, both distributed and lumped.
    pyEPR interfaces the classical distributed microwave analysis with that of 
    quantum structures and Hamiltonians. It is chiefly based on the energy participation 
    ratio approach; however, it has since v0.4 extended to cover a broad range of
    design approaches. pyEPR stradels the analysis from Maxwell’s to Schrodinger’s
    equations, and converts the solutions of distributed microwve (typically eignmode
    simulations) to a fully diagonalized spectrum of the energy levels, couplings,
    and key parameters of a many-body quantum Hamiltonian.
  doc_url: https://pyepr-docs.readthedocs.io/en/latest/
  dev_url: https://github.com/zlatko-minev/pyEPR

@DanielCohenHillel
Copy link
Collaborator Author

I never really done something like that (except for the example they provide) so I can't really help you (managing packages/versions is always the annoying part :( ). Do you need to run setup.py first or something maybe? By the way, I'm guessing that you're trying to do this from your personal computer (a mac) and not a computer that actually runs the code (only works on windows :( ), since the package is only built for osx (you can see that on the package page). This means you can't install the package through conda unless you have a mac (and I don't have) so I can't install the package (using conda install simply returns that no such package exists).

@zlatko-minev
Copy link
Owner

It is a mac. Hmm, i need to figure out how to get more channels.

I fixed the data.get('version') issue.

Now i have some other issues with can't find setup.py ...

{% set data = load_setup_py_data() %}

package:
  name: pyepr-quantum
  version: {{ data.get('version') }}

build:
  number: 0
  script: python setup.py install --single-version-externally-managed --record=record.txt

requirements:
  build: 
    - python >=3.6
    - pip
    - setuptools
    - numpy >=1.15
    - attrdict
  run:
    - python >=3.6
    - pip
    - setuptools
    - numpy >=1.15
    - attrdict

test:
  imports:
    pyEPR

about:
  home: {{ data.get('url') }}
  license: {{ data.get('license') }}
  license_file: LICENSE
  summary: {{ data.get('description') }}
  description: >
    pyEPR is an open source, BSD-licensed library providing high-efficiency,
    easy-to-use analysis functions and automation for the design of quantum
    chips based on superconducting quantum circuits, both distributed and lumped.
    pyEPR interfaces the classical distributed microwave analysis with that of 
    quantum structures and Hamiltonians. It is chiefly based on the energy participation 
    ratio approach; however, it has since v0.4 extended to cover a broad range of
    design approaches. pyEPR stradels the analysis from Maxwell’s to Schrodinger’s
    equations, and converts the solutions of distributed microwve (typically eignmode
    simulations) to a fully diagonalized spectrum of the energy levels, couplings,
    and key parameters of a many-body quantum Hamiltonian.
  doc_url: https://pyepr-docs.readthedocs.io/en/latest/
  dev_url: https://github.com/zlatko-minev/pyEPR

@DanielCohenHillel
Copy link
Collaborator Author

I really don't know nothing about it... they have a much simpler meta.yaml on the example that doesn't reference setup.py at all, maybe it's possible like that?

@zlatko-minev
Copy link
Owner

Ok, youre right , i think i was biting off too much at once. I dumbed it down a bit without the setup info and now i can upload again.

@DanielCohenHillel
Copy link
Collaborator Author

Cool :), don't forget to upload it from a windows computer as well.

@zlatko-minev
Copy link
Owner

Figuring it out ... By the way, if you have a conda cloud account I can add you

@DanielCohenHillel
Copy link
Collaborator Author

Thanks 😃 I do have an account, the username is DnL. I can add a linux package although it wouldn't be any useful right now.

@zlatko-minev
Copy link
Owner

zlatko-minev commented May 21, 2020

I added you. Try this now: https://anaconda.org/zlatko-minev/pyepr-quantum. Will helped a lot.

@DanielCohenHillel
Copy link
Collaborator Author

I tried installing it but it didn't work, on windows I got this message:

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

The following specifications were found to be incompatible with your CUDA driver:

  - feature:/win-64::__cuda==10.1=0
  - feature:|@/win-64::__cuda==10.1=0

Your installed CUDA driver is: 10.1

I don't get what CUDA has to do anything but ok. I'll try checking what causing the issue, probably some of the dependencies are in conflict, maybe try to remove them for now only to check if they cause the issue?

Also tried it on a WSL and got:

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

@zlatko-minev
Copy link
Owner

Works for me
Can you do a new conda env

conda create --name py36 python=3.6
conda activate py36
conda install -c zlatko-minev -c conda-forge pyepr-quantum

@zlatko-minev
Copy link
Owner

I think this maybe done now. Both PyPi and conda forge, thanks to @willsALMANJ

Try using: https://pypi.org/project/pyEPR-quantum/0.8/

and conda search -c conda-forge pyepr-quantum

@zlatko-minev
Copy link
Owner

Could you test to see if these work for you? Thank you!

@DanielCohenHillel
Copy link
Collaborator Author

DanielCohenHillel commented Jun 3, 2020

Nice!! I will check it out

Edit: Seems to work correctly 😄 I haven't tested all my codes using it yet but I don't think it would cause an issue. I'll check it more thoroughly tomorrow when I get to the lab and if it works I think we can close this issue.

@zlatko-minev
Copy link
Owner

Super! Glad to hear it seems to work. I will add somewhere in the docs soon how to upload and push changes to pypi and conda.

@nathanshammah
Copy link
Contributor

Maybe this issue could be closed? I was able to install it from conda (on Mac) with

conda install -c conda-forge pyepr-quantum

Another issue could be opened about documenting the installation in the docs. I am happy to help there.

@zlatko-minev
Copy link
Owner

Yes, thank you. Let me close this issue then. Would you mind helping then with the doc part?

@nathanshammah
Copy link
Contributor

Will be happy to.

@zlatko-minev
Copy link
Owner

zlatko-minev commented Sep 16, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants