0

I am tearing my hair out here! I have this working in Gentoo on my main PC, now moving the program to a different server. I am running Ubuntu 16 with a Python 3.7 Virtual Environment setup. I am in the venv environment. I have set the PROJ_DIR to point to venv/ folder with a folder there as bin/proj with 777 permissions. python3.7 -m pip install pyproj fails with PermissionError I have read this post which is the same problem in Windows as well as some others. I have even tried sudo -H but that fails too. I have installed some other packages without any problem at all. Why this one?

Here is the Traceback as requested

Collecting pyproj
  Using cached pyproj-2.6.0.tar.gz (524 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/francis/bin/RWS_MeteosatSynopCreator_2/venv/bin/python3.7 /home/francis/bin/RWS_MeteosatSynopCreator_2/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmptv31e14_
       cwd: /tmp/pip-install-k21mhy0s/pyproj
  Complete output (34 lines):
  PROJ_DIR is set, using existing proj4 installation..

  Traceback (most recent call last):
    File "/home/francis/bin/RWS_MeteosatSynopCreator_2/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
      main()
    File "/home/francis/bin/RWS_MeteosatSynopCreator_2/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/francis/bin/RWS_MeteosatSynopCreator_2/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 91, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-oz41ud89/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 148, in get_requires_for_build_wheel
      config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-oz41ud89/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 128, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-oz41ud89/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 250, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-oz41ud89/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 143, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 243, in <module>
      ext_modules=get_extension_modules(),
    File "setup.py", line 147, in get_extension_modules
      proj_dir = get_proj_dir()
    File "setup.py", line 60, in get_proj_dir
      check_proj_version(proj_dir)
    File "setup.py", line 20, in check_proj_version
      proj_ver_bytes = subprocess.check_output(proj, stderr=subprocess.STDOUT)
    File "/usr/lib/python3.7/subprocess.py", line 411, in check_output
      **kwargs).stdout
    File "/usr/lib/python3.7/subprocess.py", line 488, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
      restore_signals, start_new_session)
    File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  PermissionError: [Errno 13] Permission denied: '/home/francis/bin/RWS_MeteosatSynopCreator_2/venv/bin/proj'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/francis/bin/RWS_MeteosatSynopCreator_2/venv/bin/python3.7 /home/francis/bin/RWS_MeteosatSynopCreator_2/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmptv31e14_ Check the logs for full command output.
themetman
  • 51
  • 6
  • "*tried `sudo -H` but that fails too*" With such a major problem we need to see more details. Full traceback, please! – phd Mar 29 '20 at 10:56
  • I have added the Traceback above, too big for here. Just set it up on a different Gentroo Server, no problems at all. – themetman Mar 29 '20 at 13:47
  • Did you run your prompt/shell as an administrator? – Henrique Branco Mar 29 '20 at 13:56
  • I am in Linux, so running as normal user with the venv enabled as per the prompt (venv) francis@pytroll64:~/bin/RWS_MeteosatSynopCreator_2$ It worked OK on my Gentoo, boxes why not Uubntu – themetman Mar 29 '20 at 14:09
  • I suspect you used `sudo -H` too much. Start repairing with `sudo chown -R francis /home/francis` – phd Mar 29 '20 at 15:34
  • OK, Done That. But same problem, I have the permisions on the venv/bin/proj/ directory as 777. – themetman Mar 29 '20 at 15:46
  • I have given up, and going to use my Gentoo Box which works. Thanks to @phd for responding – themetman Mar 30 '20 at 10:03

0 Answers0