#๐ lzfse
46 messages ยท Page 1 of 1 (latest)
@echo sail
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lzfse
Failed to build lzfse
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lzfse)
I think you want Visual Studio. Disclaimer: I'm not a windows person.
@echo sail If I go to https://visualstudio.microsoft.com/visual-cpp-build-tools/ I don't get a preview like the above. But there is a "Download Build Tools" button at the top left.
The download button seems to link to https://aka.ms/vs/17/release/vs_BuildTools.exe
i alredy installed it
it doesnt did anything
Oh.
Can you post the full output of the command you ran to install lzfse and its output?
!code
Can you copy/paste the text output? Between code fence marker lines?
Could you try the command:
pip install --prefer-binary lzfse
to see if it behaves differently. There are some prebuilt binary installs of this package, your system might be covered. Or not.
What variety of Windows are you on?
22H2
still same
What version of Python? The prebuilt wheels seem to be for Python 3.10 (see https://pypi.org/project/lzfse/#files).
You could install 3.10 in addition to whatever Python you're using, and go:
py -3.10 -m pip install --prefer-binary lzfse
which tells the Python launcher (py) to use version 3.10.
'''PS C:\Users\olekm> py -3.10 -m pip install --prefer-binary lzfsepy -3.10 -m pip install --prefer-binary lzfse
No suitable Python runtime found
Pass --list (-0) to see all detected environments on your machine
or set environment variable PYLAUNCHER_ALLOW_INSTALL to use winget
or open the Microsoft Store to the requested version.'''
Hey @echo sail!
It looks like you are trying to paste code into this channel.
You seem to be using the wrong symbols to indicate where the code block should start. The correct symbols would be ```, not '''.
Here is an example of how it should look:
```
Hello, world!
```
This will result in the following:
Hello, world!```
You can **edit your original message** to correct your code block.
Yes, you will need to fetch Python 3.10 from the windows store first.
so do i need to uniistall current version?
No, you can keep multiple versions around. Often useful.
Apparently if you set the PYLAUNCHER_ALLOW_INSTALL environment variable it might autoinstall it for you.
tysm it works
Oh, excellent!
Note that it will have installed the package in the 3.10 environment. You'll need to use that. You may be able to make it the default, unsure.
hey i installed it but something still doent work
Building wheel for lzfse (pyproject.toml) ... error
error: subprocess-exited-with-error
ร Building wheel for lzfse (pyproject.toml) did not run successfully.```
Oh. I was hoping it would not need to build a wheel once you were using 3.10. That's what the --prefer-binary was meant to encourage.
so what do i do now
If the build error is as before you will need to install a working C++ compiler.
FYI: this is what's available for lzfse: https://pypi.org/project/lzfse/#files
The .tar.gz is the source version, which is what it's trying to build from.
The .whl files are prebuilt binary distributions for various platforms (zip files which are simply unpacked into your Python, and do not require a C++ compiler).
I was hoping there would be one for whatever flavour of Windows you are running.
so which one should i download
I Don't know your windows version, but pip is supposed to figure that out for you and do it automatically. You said 22H2 but I don't know what that means.
im windows 10
You could fetch the one listed here: https://pypi.org/project/lzfse/#lzfse-0.4.2-pp310-pypy310_pp73-win_amd64.whl
You would need to hand install it in your Python 3.10 tree, which seems fraught with trouble and potential error.
This is entirely a guess.
how do i hand install it
The best way would be to make a virtual environment and install it into there. Safer than potentially mangling your primary Python install.
What do you need it for?
!venv
Virtual environments are isolated Python environments, which make it easier to keep your system clean and manage dependencies. By default, when activated, only libraries and scripts installed in the virtual environment are accessible, preventing cross-project dependency conflicts, and allowing easy isolation of requirements.
To create a new virtual environment, you can use the standard library venv module: python3 -m venv .venv (replace python3 with python or py on Windows)
Then, to activate the new virtual environment:
Windows (PowerShell): .venv\Scripts\Activate.ps1
or (Command Prompt): .venv\Scripts\activate.bat
MacOS / Linux (Bash): source .venv/bin/activate
Packages can then be installed to the virtual environment using pip, as normal.
For more information, take a read of the documentation. If you run code through your editor, check its documentation on how to make it use your virtual environment. For example, see the VSCode or PyCharm docs.
Tools such as poetry and pipenv can manage the creation of virtual environments as well as project dependencies, making packaging and installing your project easier.
Note: When using PowerShell in Windows, you may need to change the execution policy first. This is only required once per user:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
So you'd:
- make a venv per the above
- activate it
- cd into its
site-packagesdirectory - unpack the
.whlfile as a zip file
As an example, here (a Mac) I've got a venv made from Python 3.12 and the site-packages directory is located here: lib/python3.12/site-packages within the venv.
Really, it would be simpler and safer if you could make the C++ compiler work.
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.