snowflake-sqlalchemy icon indicating copy to clipboard operation
snowflake-sqlalchemy copied to clipboard

Install from source breaks python interpreter

Open anujkumar93 opened this issue 5 years ago • 3 comments

  1. What version of Python are you using (python --version)? A. Python 3.7.4

  2. What operating system and processor architecture are you using (python -c 'import platform; print(platform.platform())')? A. Darwin-18.7.0-x86_64-i386-64bit

  3. What are the component versions in the environment (pip list)?

Package    Version
---------- -------
pip        19.3.1
setuptools 42.0.2
wheel      0.33.6
  1. What did you do? pip install -e [email protected]:snowflakedb/snowflake-sqlalchemy.git#egg=snowflake-sqlalchemy

  2. What did you expect to see? Working version of snowflake-sqlalchemy, equal to pip install snowflake-sqlalchemy

  3. What did you see instead? Breaks python interpreter and pip instead:

(.venv) akumar$ python
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
  File "path/to/venv/lib/python3.7/site.py", line 769, in <module>
    main()
  File "path/to/venv/lib/python3.7/site.py", line 746, in main
    paths_in_sys = addsitepackages(paths_in_sys)
  File "path/to/venv/lib/python3.7/site.py", line 279, in addsitepackages
    addsitedir(sitedir, known_paths)
  File "path/to/venv/lib/python3.7/site.py", line 202, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "path/to/venv/lib/python3.7/site.py", line 170, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 580, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
  1. Can you set logging to DEBUG and collect the logs? Doesn't matter because can't invoke Python anyways.

This seems to be related to how the repo is set up using namespace configurations, but any pointers on how to fix this would be helpful. I am trying to install from source, so I can fork it and introduce my custom changes that have not made into the official release.

anujkumar93 avatar Dec 23 '19 22:12 anujkumar93

Unfortunately we have no fix for this, the problem is not with our code. It's related to setuptools.

We will look into this later, but not in the near future.

For now don't use -e is my suggestion.

keller00 avatar Dec 23 '19 22:12 keller00

Lets keep an eye on this, as this might be the cause: https://github.com/pypa/pip/issues/6055

keller00 avatar Dec 23 '19 22:12 keller00

For now don't use -e is my suggestion.

Using the following in my requirements.txt file worked. Thanks @keller00 !

git+https://github.com/snowflakedb/snowflake-sqlalchemy#egg=snowflake-sqlalchemy

anujkumar93 avatar Dec 23 '19 23:12 anujkumar93

To clean up and re-prioritize bugs and feature requests we are closing all issues older than 6 months as of Apr 1, 2023. If there are any issues or feature requests that you would like us to address, please re-create them. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response

github-actions[bot] avatar Apr 05 '23 01:04 github-actions[bot]