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

Not able to setup the project locally on windows 10 #153

Closed
bhavukkalra opened this issue May 12, 2023 · 6 comments
Closed

Not able to setup the project locally on windows 10 #153

bhavukkalra opened this issue May 12, 2023 · 6 comments

Comments

@bhavukkalra
Copy link

I was trying to setup the project locally on a windows 10 machine. These are the steps that I took so far

  1. Edit the build.sh file and replace python3 with python and ran it in git bash. Result - The file executed successfully with no errors

  2. Make a test.py file and write this code

from zowe.zos_console_for_zowe_sdk import Console

I am getting this error -

"from zowe.zos_console_for_zowe_sdk import Console
ModuleNotFoundError: No module named 'zowe'"

Note - I am running the file from the same environment as of running the bash file

Was there something wrong with my installation? Did I miss any steps?

cc - @t1m0thyj

@t1m0thyj
Copy link
Member

@bhavukkalra Thanks for your interest in the Python SDK 🙂 Here are the steps I would suggest to setup the project locally:

  1. Clone the next branch of the project. This branch is where the latest developments have been made.
  2. (optional) Create a virtual env for your Python development environment: python -m venv venv
  3. Install dependencies for the project: pip install -r requirements.txt
    This step will also symlink local packages which should fix the error "No module named 'zowe'".

Running the build.sh script is not required to set up the project locally. It is used to package the SDKs into wheels.

@bhavukkalra
Copy link
Author

Hey thanks for an impromptu reply. Here are the steps I did now

  1. Done
  2. Created the virtual environment and activated it
  3. Ran pip install -r requirements.txt [Got an Error at this step]

DEPRECATION: lark-parser is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
Running setup.py install for lark-parser ... done

DEPRECATION: lxml is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559

Error - Running setup.py install for lxml ... error error: subprocess-exited-with-error

C:\Users\bhavu\AppData\Local\Temp\pip-install-mzjistyq\lxml_ad148854ecbc4e84838cd9279fb4d78c\src\lxml\includes/etree_defs.h(14): fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml

note: This is an issue with the package mentioned above, not pip.

(I am going to search up on this issue)

@t1m0thyj
Copy link
Member

@bhavukkalra What version of Python are you running? Since the lxml package contains native binaries, you may need to adjust its version in "requirements.txt" to match your Python version.

@bhavukkalra
Copy link
Author

bhavukkalra commented May 12, 2023

I am currently on python 3.11.

I did a little bit of digging by myself and got to know that python 3.11 is the issue here.
See below link for ref -

https://bugs.launchpad.net/lxml/+bug/1969912
janeczku/calibre-web#2606

It was suggested by most of the folks that python 3.11 is unstable with the lxml. Hence downgraded to python 3.10.

Result - pip install -r requirements.txt Now ran Successfully.

Also changed the requirements.txt lxml version to 4.9.1

Now from zowe.zos_console_for_zowe_sdk import Console

worked without any import errors as well.

I believe those were all the setup steps? @t1m0thyj

If yes, we can close this issue.

[Also I know it is not a priority right now (I got this from the contribution guidelines)
but If we could document these steps for future contributors then that would be great!
Do let me know your thoughts on it.]

@t1m0thyj
Copy link
Member

@bhavukkalra Please feel free to open a pull request against the next branch for these changes - (1) to document the command for installing dependencies and (2) to recommend using Python 3.10 or older 🙂

@bhavukkalra
Copy link
Author

Thanks for giving the "go ahead" at it Timothy. On it! Opening another Issue to track the progress of the Docs and closing this one!

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

No branches or pull requests

2 participants