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 install prefect on Windows #1073

Closed
kotpeter opened this issue May 24, 2019 · 6 comments · Fixed by #1076
Closed

Unable to install prefect on Windows #1073

kotpeter opened this issue May 24, 2019 · 6 comments · Fixed by #1076

Comments

@kotpeter
Copy link

I have Python 3.7 and I'm using virtualenv (the error is the same when I'm not using it). I get the following error:

(prefect-poc) D:+Work\Python\prefect-poc>pip install prefect
Collecting prefect
Using cached https://files.pythonhosted.org/packages/ec/97/c7d5106135d24c0fa3893a13120b438688ae06c3014f28d12e22da0f2501/prefect-0.5.3-py3-none-any.whl
Collecting idna<2.8,>=2.5 (from prefect)
Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting typing-extensions<4.0,>=3.6.4 (from prefect)
Using cached https://files.pythonhosted.org/packages/0f/62/c66e553258c37c33f9939abb2dd8d2481803d860ff68e635466f12aa7efa/typing_extensions-3.7.2-py3-none-any.whl
Collecting mypy-extensions<0.5,>=0.4.0 (from prefect)
Using cached https://files.pythonhosted.org/packages/4d/72/8d54e2b296631b9b14961d583e56e90d9d7fba8a240d5ce7f1113cc5e887/mypy_extensions-0.4.1-py2.py3-none-any.whl
Collecting dask<2.0,>=0.18 (from prefect)
Downloading https://files.pythonhosted.org/packages/58/80/6059587dcf80821fbccdc1f06b6d3fd29b64c9b38fbf1ea42889460de3de/dask-1.2.2-py2.py3-none-any.whl (717kB)
|████████████████████████████████| 727kB 939kB/s
Collecting requests<3.0,>=2.20 (from prefect)
Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting cryptography<3.0,>=2.2.2 (from prefect)
Downloading https://files.pythonhosted.org/packages/af/38/b53b461982d4c9fd9693beb7b6c6d77edd4fe7ceac7822aeb2a5754ccb15/cryptography-2.6.1-cp37-cp37m-win32.whl (1.2MB)
|████████████████████████████████| 1.2MB 6.8MB/s
Collecting marshmallow==3.0.0b19 (from prefect)
Downloading https://files.pythonhosted.org/packages/60/00/4f792fdbb7f0f243ce7fdb729bee3a8afde968e4bfda8365d47a9367a787/marshmallow-3.0.0b19-py2.py3-none-any.whl (48kB)
|████████████████████████████████| 51kB 3.2MB/s
Collecting xxhash<2.0,>=1.2.0 (from prefect)
Using cached https://files.pythonhosted.org/packages/c1/23/ddc37590022f6a43203001a0301cba5c0fb86c8b4887922a66b11567a300/xxhash-1.3.0-cp37-cp37m-win32.whl
Collecting pyyaml<4.3,>=3.13 (from prefect)
Downloading https://files.pythonhosted.org/packages/5c/ed/d6557f70daaaab6ee5cd2f8ccf7bedd63081e522e38679c03840e1acc114/PyYAML-3.13-cp37-cp37m-win32.whl (188kB)
|████████████████████████████████| 194kB ...
Collecting distributed<2.0,>=1.26.1 (from prefect)
Using cached https://files.pythonhosted.org/packages/16/00/c2883c4e234b493b81521e5f825cad89004210ca928f3ca161a1dafd8598/distributed-1.28.1-py2.py3-none-any.whl
Collecting pendulum<3.0,>=2.0.4 (from prefect)
Using cached https://files.pythonhosted.org/packages/5b/57/71fc910edcd937b72aa0ef51c8f5734fbd8c011fa1480fce881433847ec8/pendulum-2.0.4.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... error
ERROR: Complete output from command 'C:\Users\kotpeter\Envs\prefect-poc\Scripts\python.exe' 'C:\Users\kotpeter\Envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\kotpeter\AppData\Local\Temp\tmpmyip4b1k':
ERROR: C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-isunab26\overlay\Lib\site-packages\poetry\masonry\utils\tags.py:79: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == "cp"),
C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-isunab26\overlay\Lib\site-packages\poetry\masonry\utils\tags.py:82: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
if get_flag(env, "WITH_PYMALLOC", lambda: impl == "cp", warn=(impl == "cp")):
Traceback (most recent call last):
File "C:\Users\kotpeter\Envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py", line 207, in
main()
File "C:\Users\kotpeter\Envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\kotpeter\Envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py", line 69, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-isunab26\overlay\Lib\site-packages\poetry\masonry\api.py", line 49, in prepare_metadata_for_build_wheel
builder._write_metadata_file(f)
File "C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-isunab26\overlay\Lib\site-packages\poetry\masonry\builders\wheel.py", line 318, in _write_metadata_file
fp.write(decode(self.get_metadata_content()))
File "C:\Users\kotpeter\Envs\prefect-poc\lib\encodings\cp1251.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\xe9' in position 185: character maps to
----------------------------------------
ERROR: Command "'C:\Users\kotpeter\Envs\prefect-poc\Scripts\python.exe' 'C:\Users\kotpeter\Envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\kotpeter\AppData\Local\Temp\tmpmyip4b1k'" failed with error code 1 in C:\Users\kotpeter\AppData\Local\Temp\pip-install-1mbr5fb9\pendulum

@cicdw
Copy link
Member

cicdw commented May 24, 2019

Hi @kotpeter - thanks for the issue! That's interesting; would you mind trying something for me?

Inside your virtualenv, could you just try:

pip install pendulum==2.0.4

and report back with what happens?

I suspect this is an issue with poetry + pendulum interactions, and not prefect-specific.

@kotpeter
Copy link
Author

Hi @cicdw - here's the output:

(prefect-poc) D:+Work\Python\prefect-poc>pip install pendulum==2.0.4 --no-cache-dir
Collecting pendulum==2.0.4
Downloading https://files.pythonhosted.org/packages/5b/57/71fc910edcd937b72aa0ef51c8f5734fbd8c011fa1480fce881433847ec8/pendulum-2.0.4.tar.gz (75kB)
|████████████████████████████████| 81kB 1.1MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... error
ERROR: Complete output from command 'c:\users\kotpeter\envs\prefect-poc\scripts\python.exe' 'c:\users\kotpeter\envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\kotpeter\AppData\Local\Temp\tmpr132d1xu':
ERROR: C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-xyhs4w61\overlay\Lib\site-packages\poetry\masonry\utils\tags.py:79: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == "cp"),
C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-xyhs4w61\overlay\Lib\site-packages\poetry\masonry\utils\tags.py:82: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
if get_flag(env, "WITH_PYMALLOC", lambda: impl == "cp", warn=(impl == "cp")):
Traceback (most recent call last):
File "c:\users\kotpeter\envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py", line 207, in
main()
File "c:\users\kotpeter\envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\users\kotpeter\envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py", line 69, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-xyhs4w61\overlay\Lib\site-packages\poetry\masonry\api.py", line 49, in prepare_metadata_for_build_wheel
builder._write_metadata_file(f)
File "C:\Users\kotpeter\AppData\Local\Temp\pip-build-env-xyhs4w61\overlay\Lib\site-packages\poetry\masonry\builders\wheel.py", line 318, in _write_metadata_file
fp.write(decode(self.get_metadata_content()))
File "c:\users\kotpeter\envs\prefect-poc\lib\encodings\cp1251.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\xe9' in position 185: character maps to
----------------------------------------
ERROR: Command "'c:\users\kotpeter\envs\prefect-poc\scripts\python.exe' 'c:\users\kotpeter\envs\prefect-poc\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\kotpeter\AppData\Local\Temp\tmpr132d1xu'" failed with error code 1 in C:\Users\kotpeter\AppData\Local\Temp\pip-install-qvroav1x\pendulum

Looks like you're right. They're supposed to fix this interaction (python-poetry/poetry#1030), but it doesn't seem like it's been fixed completely.

Can you suggest any workaround for the situation?

@cicdw
Copy link
Member

cicdw commented May 25, 2019

Hmmm you could try an older version of poetry? poetry==0.12.11 might work.

@cicdw
Copy link
Member

cicdw commented May 25, 2019

Alternatively, using conda and installing prefect from conda forge might allow you to work around this

@cicdw
Copy link
Member

cicdw commented May 26, 2019

One last thing: I just tested locally that all of our tests pass with pendulum==2.0.2, which supposedly is installable on Windows machines. If you could verify that version works for you @kotpeter, I'd be happy to PR an update to our requirements to allow for pendulum==2.0.2, and then you could install pendulum==2.0.2 and the latest version of Prefect directly from GitHub!

@kotpeter
Copy link
Author

Hi @cicdw - yes, Pendulum 2.0.2 got installed with no issues. Please put a comment here when you make the change :) Thank you very much!

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

Successfully merging a pull request may close this issue.

2 participants