tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.55k stars 592 forks source link

TabPy offline installation #580

Open wstando opened 1 year ago

wstando commented 1 year ago

Environment information:

Is there any possibility to install the TabPY offline on a server without internet access?

pip --version pip 22.0.4 from C:\Users..\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)

I tried the following command: E:\TabPy-master>pip install -e . Obtaining file:///E:/TabPy-master Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [41 lines of output] WARNING: The wheel package is not available. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013E976F0E20>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytest-runner/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013E976F10F0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytest-runner/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013E976F1360>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytest-runner/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013E976F14E0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytest-runner/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013E976F1660>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytest-runner/ ERROR: Could not find a version that satisfies the requirement pytest-runner (from versions: none) ERROR: No matching distribution found for pytest-runner Traceback (most recent call last): File "C:\Users..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg subprocess.check_call(cmd) File "C:\Users..\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['C:\Users\..\AppData\Local\Programs\Python\Python310\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\..\AppData\Local\Temp\tmpkbxpl4xg', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "E:\TabPy-master\setup.py", line 107, in <module>
      setup_package()
    File "E:\TabPy-master\setup.py", line 20, in setup_package
      setup(
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 152, in setup
      _install_setup_requires(attrs)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 806, in fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 766, in resolve
      dist = best[req.key] = env.best_match(
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 1051, in best_match
      return self.obtain(req, installer)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 1063, in obtain
      return installer(requirement)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 877, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
      raise DistutilsError(str(e)) from e
  distutils.errors.DistutilsError: Command '['C:\\Users\\..\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\..\\AppData\\Local\\Temp\\tmpkbxpl4xg', '--quiet', 'pytest-runner']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

0golovatyi commented 1 year ago

@wstando You need to have all the packages tabpy depends on as mentioned at https://github.com/tableau/TabPy/blob/master/CONTRIBUTING.md#cloning-tabpy-repository.

wstando commented 1 year ago

@0golovatyi Thank you for your response. I have downloaded the whole package.

When trying to install the result as below:

E:\TabPy-master>pip install -r requirements.txt Obtaining file:///E:/TabPy-master (from -r requirements.txt (line 3)) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [41 lines of output] WARNING: The wheel package is not available. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pytest-runner/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pytest-runner/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pytest-runner/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pytest-runner/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pytest-runner/ ERROR: Could not find a version that satisfies the requirement pytest-runner (from versions: none) ERROR: No matching distribution found for pytest-runner Traceback (most recent call last): File "C:\Users..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg subprocess.check_call(cmd) File "C:\Users..\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['C:\Users\..\AppData\Local\Programs\Python\Python310\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\..\AppData\Local\Temp\tmpgsqag51y', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "E:\TabPy-master\setup.py", line 107, in <module>
      setup_package()
    File "E:\TabPy-master\setup.py", line 20, in setup_package
      setup(
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 152, in setup
      _install_setup_requires(attrs)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 806, in fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 766, in resolve
      dist = best[req.key] = env.best_match(
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 1051, in best_match
      return self.obtain(req, installer)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 1063, in obtain
      return installer(requirement)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 877, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "C:\Users\..\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
      raise DistutilsError(str(e)) from e
  distutils.errors.DistutilsError: Command '['C:\\Users\\..\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\..\\AppData\\Local\\Temp\\tmpgsqag51y', '--quiet', 'pytest-runner']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))) - skipping