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
- We are behind a firewall and not allowed to use PyPi.
- 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
- (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).
- (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
?