Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

pip install from custom directory #60

Open
scopenco opened this issue Jun 30, 2016 · 2 comments
Open

pip install from custom directory #60

scopenco opened this issue Jun 30, 2016 · 2 comments

Comments

@scopenco
Copy link

Hello,

i'm trying to install module with pip from custom directory, like this

/opt/virtenv/bin/python -m pip install -U /opt/myapp

with next code:

python_virtualenv '/opt/virtenv' do
  action :create
  python '/usr/bin/python3.5'
end

python_package 'myapp' do
  virtualenv '/opt/virtenv'
  install_options "-U /opt/myapp"
end

i receive error

          ---- Begin output of /opt/virtenv/bin/python -    myapp ----
           STDOUT:
           STDERR: The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
           Could not find a version that satisfies the requirement myapp (from versions: )

How can i do this correctly?

@scopenco
Copy link
Author

OK, i'm using execute now, but i've dived in this problem and found that resource python_package fail when i try to install private python module

             Mixlib::ShellOut::ShellCommandFailed
             ------------------------------------
             Expected process to exit with [0], but received '1'
             ---- Begin output of ["/opt/python3_ve/bin/python", "-", "gridfs_loader"] ----
             STDOUT:
             STDERR: The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
             Could not find a version that satisfies the requirement gridfs_loader (from versions: )
             Traceback (most recent call last):
        File "<stdin>", line 38, in <module>
        File "/opt/python3_ve/lib64/python3.5/site-packages/pip/index.py", line 491, in find_requirement
          'No matching distribution found for %s' % req
             pip.exceptions.DistributionNotFound: No matching distribution found for gridfs_loader
             ---- End output of ["/opt/python3_ve/bin/python", "-", "gridfs_loader"] ----
             Ran ["/opt/python3_ve/bin/python", "-", "gridfs_loader"] returned 1

The problem is in pip. It show pip.exceptions.DistributionNotFound on private module.

@coderanger
Copy link
Member

Define "private module"? This might be related to #61 with the hack script not fully grokking non-standard index URLs?

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

No branches or pull requests

2 participants