ARiisgaard / Thesis

0 stars 0 forks source link

Installing Pypi Packages using conda #15

Open ARiisgaard opened 4 years ago

ARiisgaard commented 4 years ago

TL;DR: I'm struggling with adding non-conda packages to the environment in an easily recreatable manner - for now the packages have been added using "pip install x". If the final product ends up using these packages I'll try to solve this issue, but I'll move on for now

The packages Tilestache and Modestmaps are not available directly through conda. I have unsuccesfully tried to wrap them as conda packages using conda skeleton, but I end up getting a 404 error, when using the "conda-build tilestache" command

image

My best guess at a new approach would be to

source:
  fn: '{{ name }}-{{ version }}.{{ file_ext }}'
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ file_ext }}
  '{{ hash_type }}': '{{ hash_value }}'

To

source:
  path: 'path-to-tar.file'

And then run a "conda-build --use-local tilestache" command, however it then is missing the url in other places (example with modestmaps):

WARNING:conda_build.build:No files or script found for output modestmaps
WARNING conda_build.build:bundle_conda(920): No files or script found for output modestmaps
number of files: 0
Fixing permissions
Importing conda-verify failed.  Please be sure to test your packages.  conda install conda-verify to make this message go away.
WARNING:conda_build.build:Importing conda-verify failed.  Please be sure to test your packages.  conda install conda-verify to make this message go away.
WARNING conda_build.build:bundle_conda(1004): Importing conda-verify failed.  Please be sure to test your packages.  conda install conda-verify to make this message go away.

...

Traceback (most recent call last):
  File "C:\Users\A-G-R\.conda\envs\MakeCityWebsite\conda-bld\modestmaps_1583252394134\test_tmp\run_test.py", line 2, in <module>
    import ModestMaps
ModuleNotFoundError: No module named 'ModestMaps'

For now they are just installed as regular "pip install"s, but are therefore missing in the environment list.