squeaky-pl / portable-pypy

Portable 64 bit x86 PyPy binaries for many Linux distributions.
Other
478 stars 38 forks source link

Permission denied error when trying to make a virtualenv #73

Closed terrycojones closed 5 years ago

terrycojones commented 6 years ago

I followed the instructions to try to make myself a virtualenv:

$ pypy3.5-5.10.1-linux_x86_64-portable/bin/virtualenv-pypy 35pypy

This seems to be succeeding...

Using base prefix '/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable'
New pypy executable in /rds/project/djs200/rds-djs200-acorg/bt/packages/35pypy/bin/pypy

But then a permission denied error happens:

Traceback (most recent call last):
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/bin/../virtualenv_support/virtualenv.py", line 2343, in <module>
    main()
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/bin/../virtualenv_support/virtualenv.py", line 712, in main
    symlink=options.symlink)
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/bin/../virtualenv_support/virtualenv.py", line 927, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/bin/../virtualenv_support/virtualenv.py", line 1406, in install_python
    raise e
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/bin/../virtualenv_support/virtualenv.py", line 1398, in install_python
    stdout=subprocess.PIPE)
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/lib-python/3/subprocess.py", line 592, in __init__
    _pypy_install_libs_after_virtualenv(args[0])
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/lib-python/3/subprocess.py", line 1572, in _pypy_install_libs_after_virtualenv
    os.path.join(dest_dir, '../lib'))
  File "/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/lib-python/3/shutil.py", line 359, in copytree
    raise Error(errors)
shutil.Error: [('/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/bin/../lib/libtinfow.so.6.0', '/rds/project/djs200/rds-djs200-acorg/bt/packages/35pypy/bin/../lib/libtinfow.so.6.0', "[Errno 13] Permission denied: '/rds/project/djs200/rds-djs200-acorg/bt/packages/35pypy/bin/../lib/libtinfow.so.6.0'"), ('/rds/project/djs200/rds-djs200-acorg/bt/packages/pypy3.5-5.10.1-linux_x86_64-portable/bin/../lib/libsqlite3.so.0', '/rds/project/djs200/rds-djs200-acorg/bt/packages/35pypy/bin/../lib/libsqlite3.so.0', "[Errno 13] Permission denied: '/rds/project/djs200/rds-djs200-acorg/bt/packages/35pypy/bin/../lib/libsqlite3.so.0'"),

There's a lot more similar output, all with errno 13 messages. Looking at one of the mentioned files (from the copytree error), I can see it exists, but it has 555 perms:

$ ls -l /rds/project/djs200/rds-djs200-acorg/bt/packages/35pypy/bin/../lib/libtinfow.so.6.0
-r-xr-xr-x 1 tcj25 rds-djs200-acorg 241984 Jan 14 13:49 /rds/project/djs200/rds-djs200-acorg/bt/packages/35pypy/bin/../lib/libtinfow.so.6.0

I can see virtualenv_support/virtualenv.py has a make_exe function that looks like it could be setting the 555 perm. That's as far as I've looked, at present. Let me know if I can help.

squeaky-pl commented 6 years ago

I can't reproduce your problem, for me creating virtualenv somewhere I have permissions to write doesnt error out. Are you sure you have write permissions? Are you trying to write over an existing virtualenv in place?