1

At my work we have some restrictions. Let me present the setup.

Setup

The computers for the average user have the current installation

  • Win7
  • Python 2.7.12 via Anaconda 4.1.1 64 bit.
  • Including SciPy 0.17.1.

Goal

I have developed a package hanzo that depends on packages which are not available from the bare anaconda installation. I want my package to be installed with all its dependencies via pip.

Challenges

  1. We are behind a firewall and not allowed to use PyPi.
  2. The python installation is located in a folder where the user doesn't have write rights. Hence packages have to be installed in a separate folder.

On my developer computer I have access to PyPi and installed all the necessary dependencies. I have uploaded the dependencies (whl/zip/tar.gz) into my own PyPi-repository. This overcomes the first problem.

My own thoughts

Now on a user computer I'd run the following (a hanzo wheel has been uploaded to the PyPi-server as well)

pip install --index-url <My PyPi-URL> --target C:\py_packages hanzo

but a compiler problem occurs if a package like SciPy is required (similar to this). This leads to two questions

  1. (Fatal): Why the error when the user have SciPy 0.17.1 installed and there is not any specific version required for my package (or for its dependencies).
  2. (Not fatal): Is there any way to install new versions of packages that needs to be compiled like SciPy, numpy and pandas in the current user setup? Say I want to add a package that needs a specific version of SciPy then I'd be in trouble.

Edit

Is there possibilites with virtualenv or using conda instead of pip?

Community
  • 1
  • 1
mr.bjerre
  • 2,384
  • 2
  • 24
  • 37
  • Seriously... This looks like so many shapes of pain. Get the IT guy and let him setup something usable. I don't think this kind of trouble is worth it. Another thing: you should prefer in general conda to pip, especially for scipy as pip install scipy will always build from the sources (on windows: hell) and conda won't. Check the conda docs, if installing from previously collected files is possible. I might also be possible, that your (kind of implicit call to pip) wan't to update scipy by default (ignoring your current version). Maybe you want to fix the version in the setup.py script. – sascha Dec 15 '16 at 17:16
  • Can you install the necessary dependencies via anaconda? Using conda, you can install any package (e.g. the dependencies) from anaconda.org, but you might have to specify the channel using the -c option and set your http proxy locally to do so. If you need a package that isn't on anaconda.org, you can upload it there. You can also create your package as a conda package so that it is built by conda. – Charlie Haley Dec 15 '16 at 17:52

0 Answers0