Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run start #12

Closed
olivesx opened this issue Jan 7, 2019 · 11 comments
Closed

Unable to run start #12

olivesx opened this issue Jan 7, 2019 · 11 comments
Assignees
Labels
installation Issues related to setup and installation

Comments

@olivesx
Copy link

olivesx commented Jan 7, 2019

Hi there, I'm using py tools 3.8 and python 3.7 to try the forecasting apps. After the initialization, I tried starting the start file but am faced with the following:

Traceback (most recent call last):
File "main.py", line 16, in
import ServerSideExtension_pb2 as SSE
File "C:\Users\Documents\qlik-py-tools-3.8\qlik-py-env\generated\ServerSideExtension_pb2.py", line 6, in
from google.protobuf.internal import enum_type_wrapper
ModuleNotFoundError: No module named 'google'
Press any key to continue . . .

Am new to this and appreciate your help, thanks!

  • Olive
@nabeel-oz
Copy link
Owner

Hi Olive, at the moment this SSE does not support Python 3.7. You will need to go down to version 3.6.7 to run this SSE. Some of the packages I am using are unstable with Python 3.7.

Please see the note under Pre-requisites.

@olivesx
Copy link
Author

olivesx commented Jan 7, 2019

Thanks! I reinstalled 3.6.7 instead and changed my windows path way. However, I still faced the same issue. Noticed in initialization, am unable to download 1 package successfully.

Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\Users\AppData\Local\Temp\pip-uninstall-pnlh70g3\users\documents\qlik-py-tools-3.8\qlik-py-env\lib\site-packages\pip\_vendor\urllib3\packages\ssl_match_hostname\pycache\_implementation.cpython-36.pyc'

@nabeel-oz nabeel-oz self-assigned this Jan 7, 2019
@nabeel-oz nabeel-oz added the installation Issues related to setup and installation label Jan 7, 2019
@nabeel-oz
Copy link
Owner

Did you execute the initialization script with the Run as administrator option? From the error it looks like the script fails very early in the process when upgrading pip. You can simply delete the qlik-py-env folder and try running the initialization again.

If it still fails can you paste the complete output form the command prompt here?

@olivesx
Copy link
Author

olivesx commented Jan 7, 2019

Setting up the Python virtual environment...

Copying project files to the new directory...

C:\Users\qlik-py-tools-3.8\generated\ServerSideExtension_pb2.py
C:\Users\qlik-py-tools-3.8\generated_init_.py
2 File(s) copied
C:\Users\qlik-py-tools-3.8\core\functions.json
C:\Users\qlik-py-tools-3.8\core\logger.config
C:\Users\qlik-py-tools-3.8\core_clustering.py
C:\Users\qlik-py-tools-3.8\core_machine_learning.py
C:\Users\qlik-py-tools-3.8\core_prophet.py
C:\Users\qlik-py-tools-3.8\core_sklearn.py
C:\Users\qlik-py-tools-3.8\core_utils.py
C:\Users\qlik-py-tools-3.8\core_init_.py
C:\Users\qlik-py-tools-3.8\core_main_.py
9 File(s) copied

Activating the virtual environment...

Installing required packages...

Collecting setuptools
Using cached https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl
Collecting pip
Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
Found existing installation: setuptools 39.0.1
Uninstalling setuptools-39.0.1:
Successfully uninstalled setuptools-39.0.1
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\Users\AppData\Local\Temp\pip-uninstall-fqe3u0se\users\qlik-py-tools-3.8\qlik-py-env\lib\site-packages\pip\_vendor\urllib3\packages\ssl_match_hostname\pycache\_implementation.cpython-36.pyc'

Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\qlik-py-tools-3.8\qlik-py-env\Scripts\pip.exe_main
.py", line 5, in
ModuleNotFoundError: No module named 'pip._internal'
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\qlik-py-tools-3.8\qlik-py-env\Scripts\pip.exe_main
.py", line 5, in
ModuleNotFoundError: No module named 'pip._internal'
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\qlik-py-tools-3.8\qlik-py-env\Scripts\pip.exe_main
.py", line 5, in
ModuleNotFoundError: No module named 'pip._internal'
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\qlik-py-tools-3.8\qlik-py-env\Scripts\pip.exe_main
.py", line 5, in
ModuleNotFoundError: No module named 'pip._internal'
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\qlik-py-tools-3.8\qlik-py-env\Scripts\pip.exe_main
.py", line 5, in
ModuleNotFoundError: No module named 'pip._internal'
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\qlik-py-tools-3.8\qlik-py-env\Scripts\pip.exe_main
.py", line 5, in
ModuleNotFoundError: No module named 'pip._internal'

Creating a new firewall rule for TCP port 50055...

Ok.

All done. Run Qlik-Py-Start.bat to start the SSE Extension Service.

Press any key to continue . . .

@olivesx
Copy link
Author

olivesx commented Jan 7, 2019

Hello, yes I did. I ran it as administrator

@nabeel-oz
Copy link
Owner

There seems to be something about your environment stopping us from updating pip, which is required to install the other packages.

Can you try updating pip manually for your environment:

  • Open a command prompt or powershell as an administrator
  • Run the command below
    python -m pip install --upgrade pip
    

If the command above works, you can try the initialization again. If it fails, you should consider what may be special about your environment, for e.g. Anaconda installed, or another version of Python is also installed, etc. An uninstall and reinstall of Python 3.6.7 may help.

@olivesx
Copy link
Author

olivesx commented Jan 7, 2019

I tried doing both - running the command, and then re-installing my python, only keeping 3.6.7, but they both do not work. Anaconda was not installed.

The error message was "No such file or directory", probably cause the directory the script read was a combination of my Python directory + PY Tools 3.8 directory. Any way I can fix that?
'C:\Users\AppData\Local\Temp\pip-uninstall-pnlh70g3\users\documents\qlik-py-tools-3.8\qlik-py-env\lib\site-packages\pip_vendor\urllib3\packages\ssl_match_hostname\pycache_implementation.cpython-36.pyc'

@nabeel-oz
Copy link
Owner

Did you get the same error when just running the python -m pip install --upgrade pip command directly in a command prompt?

This is an environment error that isn't specific to the SSE. One thing you can try is reinstalling pip using the bootstrap solution here:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py --force-reinstall

@olivesx
Copy link
Author

olivesx commented Jan 8, 2019

image

When I keyed it into the command prompt direct, it was successfully installed.

@nabeel-oz
Copy link
Owner

Ah so did you still get the error when running Qlik-Py-Init.bat after the pip upgrade? If so, you could try taking out the step from the script.

Right click the file and open it in notepad.

Change this line:

python -m pip install --upgrade setuptools pip

To:

python -m pip install --upgrade setuptools

Save the file and then try running it again as an administrator. If you still have trouble try after taking out that line entirely.

@nabeel-oz
Copy link
Owner

Hi Olive, did that resolve the installation issue? If so I'll go ahead and close this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Issues related to setup and installation
Projects
None yet
Development

No branches or pull requests

2 participants