tableau / TabPy

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

Could not find suitable distribution for Requirement.parse('Tornado-JSON') #164

Closed ghost closed 5 years ago

ghost commented 5 years ago

I am getting the following error as I run the startup.cmd to start the service

Installed c:\progra~1\tabpy\sandbox\lib\site-packages\tabpy_server-0+unknown-py3.7.egg Processing dependencies for tabpy-server==0+unknown Searching for Tornado-JSON Reading https://pypi.org/simple/Tornado-JSON/ Download error on https://pypi.org/simple/Tornado-JSON/: [WinError 10061] No connection could be made because the target machine actively refused it -- Some packages may not be found! Couldn't find index page for 'Tornado-JSON' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading https://pypi.org/simple/ Download error on https://pypi.org/simple/: [WinError 10061] No connection could be made because the target machine actively refused it -- Some packages may not be found! No local packages or working download links found for Tornado-JSON error: Could not find suitable distribution for Requirement.parse('Tornado-JSON')

When I try to install Tornado-JSON (I have a proxy) I get the message that Tornado-JSON is installed

C:\Windows\system32>pip install --proxy="" --index-url=https://my-proxy.com/repository/pypi-proxy/simple Tornado-JSON==1.3.3 Looking in indexes: https://my-proxy.com/repository/pypi-proxy/simple Collecting Tornado-JSON==1.3.3 Using cached https://my-proxy.com/repository/pypi-proxy/packages/24/79/20ddcf876803af829999f9b4955fd92ae83914b0680304d9c687a039a9b7/Tornado-JSON- 1.3.3.tar.gz Requirement already satisfied: tornado>=3.2.2 in c:\program files (x86)\python37-32\lib\site-packages (from Tornado-JSON==1.3.3) (5.1.1) Requirement already satisfied: jsonschema>=2.3.0 in c:\program files (x86)\python37-32\lib\site-packages (from Tornado-JSON==1.3.3) (2.6.0) Installing collected packages: Tornado-JSON Found existing installation: Tornado-JSON 1.3.2 Uninstalling Tornado-JSON-1.3.2: Successfully uninstalled Tornado-JSON-1.3.2 Running setup.py install for Tornado-JSON ... done Successfully installed Tornado-JSON-1.3.3

What should I do?

nmannheimer commented 5 years ago

Hi @itsAftab does the machine you are running the install on have access to pypi, ie can you install other packages with pip? It looks like you are trying to pull a new package and the connection is getting blocked. Also, can you let me know which exact version of Python you are using, ie 3.6.5?

WillAyd commented 5 years ago

Does exporting the HTTPS_PROXY environment variable help at all? Should for pip not sure about setuptools but worth a shot

https://stackoverflow.com/questions/14149422/using-pip-behind-a-proxy

ghost commented 5 years ago

@nmannheimer yes I have. @WillAyd didn't try it but I managed to solve it the problem. Here is how it started. I was playing around with TabPy and created two virtual enviornemnts. I got the error when I ran startup.cmd. In one of the environments I was getting an error about Tornado-JSON and on the other an error about an other package, but both packages are installed. Since the server I have installed TabPy is the Tableau server may be I don't need the virtual environment after all! I have now modified the startup.cmd and it is working:

@ECHO off
SETLOCAL

REM Set environment variables.
SET TABPY_ROOT="C:\Program Files\TabPy"
SET STARTUP_CMD=python tabpy.py

REM Start TabPy server.
ECHO Starting TabPy server...
ECHO;
CD %TABPY_ROOT%\tabpy-server\tabpy_server
%STARTUP_CMD%
CD %TABPY_ROOT%
IF %ERRORLEVEL% NEQ 0 (
    ECHO      Failed to start TabPy server.
    GOTO:ERROR
)

GOTO:SUCCESS

REM Exit with error
:ERROR
    ENDLOCAL
    EXIT /B 1

REM All succeeded
:SUCCESS
    EXIT /B %ERRORLEVEL%
    ENDLOCAL