New to Python and would love some feedback! /u/WonderfulFlan2827 Python Education

New to Python and would love some feedback! /u/WonderfulFlan2827 Python Education

M

Would love some feedback to see if this could be coded differently! I did the original one then had ChatGPT clean it up. I’m not experienced enough to know if it’s good coding. Thanks in advance for the help!

Code starts here

import string

Generate the matrix

matrix = [list(string.ascii_lowercase[i:i + 4]) for i in range(0, 26, 4)] matrix[-1].append(‘!’) # Add ‘!’ to the last row

Define indices

indices = [ (0, 3), (3, 2), (3, 1), (0, 0), (2, 3), (0, 3), None, (4, 3), (4, 1), (5, 0), (3, 0), (3, 3), None, (2, 0), (4, 2), None, (0, 1), (0, 0), (0, 2), (2, 2), (6, 2) ]

Extract result

result = “”.join( ” ” if i is None else matrix[i[0]][i[1]] for i in indices ).upper()

Print the result

print(result)

submitted by /u/WonderfulFlan2827
[link] [comments]

​r/learnpython M Would love some feedback to see if this could be coded differently! I did the original one then had ChatGPT clean it up. I’m not experienced enough to know if it’s good coding. Thanks in advance for the help! Code starts here import string Generate the matrix matrix = [list(string.ascii_lowercase[i:i + 4]) for i in range(0, 26, 4)] matrix[-1].append(‘!’) # Add ‘!’ to the last row Define indices indices = [ (0, 3), (3, 2), (3, 1), (0, 0), (2, 3), (0, 3), None, (4, 3), (4, 1), (5, 0), (3, 0), (3, 3), None, (2, 0), (4, 2), None, (0, 1), (0, 0), (0, 2), (2, 2), (6, 2) ] Extract result result = “”.join( ” ” if i is None else matrix[i[0]][i[1]] for i in indices ).upper() Print the result print(result) submitted by /u/WonderfulFlan2827 [link] [comments] 

M

Would love some feedback to see if this could be coded differently! I did the original one then had ChatGPT clean it up. I’m not experienced enough to know if it’s good coding. Thanks in advance for the help!

Code starts here

import string

Generate the matrix

matrix = [list(string.ascii_lowercase[i:i + 4]) for i in range(0, 26, 4)] matrix[-1].append(‘!’) # Add ‘!’ to the last row

Define indices

indices = [ (0, 3), (3, 2), (3, 1), (0, 0), (2, 3), (0, 3), None, (4, 3), (4, 1), (5, 0), (3, 0), (3, 3), None, (2, 0), (4, 2), None, (0, 1), (0, 0), (0, 2), (2, 2), (6, 2) ]

Extract result

result = “”.join( ” ” if i is None else matrix[i[0]][i[1]] for i in indices ).upper()

Print the result

print(result)

submitted by /u/WonderfulFlan2827
[link] [comments]  M Would love some feedback to see if this could be coded differently! I did the original one then had ChatGPT clean it up. I’m not experienced enough to know if it’s good coding. Thanks in advance for the help! Code starts here import string Generate the matrix matrix = [list(string.ascii_lowercase[i:i + 4]) for i in range(0, 26, 4)] matrix[-1].append(‘!’) # Add ‘!’ to the last row Define indices indices = [ (0, 3), (3, 2), (3, 1), (0, 0), (2, 3), (0, 3), None, (4, 3), (4, 1), (5, 0), (3, 0), (3, 3), None, (2, 0), (4, 2), None, (0, 1), (0, 0), (0, 2), (2, 2), (6, 2) ] Extract result result = “”.join( ” ” if i is None else matrix[i[0]][i[1]] for i in indices ).upper() Print the result print(result) submitted by /u/WonderfulFlan2827 [link] [comments]

Read more

[Help]Sending commands to a specific window, even there are others with the same title. /u/rgdoabc Python Education

[Help]Sending commands to a specific window, even there are others with the same title. /u/rgdoabc Python Education

Hello.

I don’t know much about programming (studied a little 15 years ago) yet I decided to make a little application to help me with a game. Things like sending an entire command in the console with just a key press. I did manage to do it with AHK, but I want to add a UI and other functions in the future and I imagine AHK isn’t going to be good for that.

The first function is getting into a loop until it detects that the game is running. This I managed to do using psutil.

The second part is where I’m lost, because I don’t want to send those commands to another window by accident neither I want to send it when the window isn’t active..

submitted by /u/rgdoabc
[link] [comments]

​r/learnpython Hello. I don’t know much about programming (studied a little 15 years ago) yet I decided to make a little application to help me with a game. Things like sending an entire command in the console with just a key press. I did manage to do it with AHK, but I want to add a UI and other functions in the future and I imagine AHK isn’t going to be good for that. The first function is getting into a loop until it detects that the game is running. This I managed to do using psutil. The second part is where I’m lost, because I don’t want to send those commands to another window by accident neither I want to send it when the window isn’t active.. submitted by /u/rgdoabc [link] [comments] 

Hello.

I don’t know much about programming (studied a little 15 years ago) yet I decided to make a little application to help me with a game. Things like sending an entire command in the console with just a key press. I did manage to do it with AHK, but I want to add a UI and other functions in the future and I imagine AHK isn’t going to be good for that.

The first function is getting into a loop until it detects that the game is running. This I managed to do using psutil.

The second part is where I’m lost, because I don’t want to send those commands to another window by accident neither I want to send it when the window isn’t active..

submitted by /u/rgdoabc
[link] [comments]  Hello. I don’t know much about programming (studied a little 15 years ago) yet I decided to make a little application to help me with a game. Things like sending an entire command in the console with just a key press. I did manage to do it with AHK, but I want to add a UI and other functions in the future and I imagine AHK isn’t going to be good for that. The first function is getting into a loop until it detects that the game is running. This I managed to do using psutil. The second part is where I’m lost, because I don’t want to send those commands to another window by accident neither I want to send it when the window isn’t active.. submitted by /u/rgdoabc [link] [comments]

Read more

How to read file as binary then doing regex search to it /u/metalhorse209 Python Education

How to read file as binary then doing regex search to it /u/metalhorse209 Python Education

This is my code below

import re

hfile1 = open(“example1.so”, “rb”) bfile1 = hfile1.read() hfile1.close()

hfile2 = open(“example2.so”, “rb”) bfile2 = hfile2.read() hfile2.close()

afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) afile2 = re.findall(‘[0-9A-Fa-f]{2}’, bfile2)

print(afile1)

print(afile2)

and this is error message below

Traceback (most recent call last): File “”, line 12, in <module> afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) File “”, line 278, in findall return _compile(pattern, flags).findall(string) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

TypeError: cannot use a string pattern on a bytes-like object

How to treat the binary read as string?

submitted by /u/metalhorse209
[link] [comments]

​r/learnpython This is my code below import re hfile1 = open(“example1.so”, “rb”) bfile1 = hfile1.read() hfile1.close() hfile2 = open(“example2.so”, “rb”) bfile2 = hfile2.read() hfile2.close() afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) afile2 = re.findall(‘[0-9A-Fa-f]{2}’, bfile2) print(afile1) print(afile2) and this is error message below Traceback (most recent call last): File “”, line 12, in <module> afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) File “”, line 278, in findall return _compile(pattern, flags).findall(string) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ TypeError: cannot use a string pattern on a bytes-like object How to treat the binary read as string? submitted by /u/metalhorse209 [link] [comments] 

This is my code below

import re

hfile1 = open(“example1.so”, “rb”) bfile1 = hfile1.read() hfile1.close()

hfile2 = open(“example2.so”, “rb”) bfile2 = hfile2.read() hfile2.close()

afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) afile2 = re.findall(‘[0-9A-Fa-f]{2}’, bfile2)

print(afile1)

print(afile2)

and this is error message below

Traceback (most recent call last): File “”, line 12, in <module> afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) File “”, line 278, in findall return _compile(pattern, flags).findall(string) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

TypeError: cannot use a string pattern on a bytes-like object

How to treat the binary read as string?

submitted by /u/metalhorse209
[link] [comments]  This is my code below import re hfile1 = open(“example1.so”, “rb”) bfile1 = hfile1.read() hfile1.close() hfile2 = open(“example2.so”, “rb”) bfile2 = hfile2.read() hfile2.close() afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) afile2 = re.findall(‘[0-9A-Fa-f]{2}’, bfile2) print(afile1) print(afile2) and this is error message below Traceback (most recent call last): File “”, line 12, in <module> afile1 = re.findall(‘[0-9A-Fa-f]{2}’, bfile1) File “”, line 278, in findall return _compile(pattern, flags).findall(string) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ TypeError: cannot use a string pattern on a bytes-like object How to treat the binary read as string? submitted by /u/metalhorse209 [link] [comments]

Read more

New to python and need a hand with something I tried making /u/Popular-Spirit1306 Python Education

New to python and need a hand with something I tried making /u/Popular-Spirit1306 Python Education

(Tldr at bottom since this is a ramble)I tried making a simple program to let me know when my internet connection came back online. It was supposed to do a “ping google.com” with a shibang, and if there was no output after 10 seconds, wait 30 seconds and loop again. If it did receive packets, then it would run a “figlet online” in the terminal and exit. Super simple, but I don’t know how to capture or interpret shell output in a python script and it was also not displaying any of the command outputs in my terminal. Sorry if this is rambly Tldr: how do I run shell, capture shell output as a variable, and run commands who’s output is visible in the terminal.

submitted by /u/Popular-Spirit1306
[link] [comments]

​r/learnpython (Tldr at bottom since this is a ramble)I tried making a simple program to let me know when my internet connection came back online. It was supposed to do a “ping google.com” with a shibang, and if there was no output after 10 seconds, wait 30 seconds and loop again. If it did receive packets, then it would run a “figlet online” in the terminal and exit. Super simple, but I don’t know how to capture or interpret shell output in a python script and it was also not displaying any of the command outputs in my terminal. Sorry if this is rambly Tldr: how do I run shell, capture shell output as a variable, and run commands who’s output is visible in the terminal. submitted by /u/Popular-Spirit1306 [link] [comments] 

(Tldr at bottom since this is a ramble)I tried making a simple program to let me know when my internet connection came back online. It was supposed to do a “ping google.com” with a shibang, and if there was no output after 10 seconds, wait 30 seconds and loop again. If it did receive packets, then it would run a “figlet online” in the terminal and exit. Super simple, but I don’t know how to capture or interpret shell output in a python script and it was also not displaying any of the command outputs in my terminal. Sorry if this is rambly Tldr: how do I run shell, capture shell output as a variable, and run commands who’s output is visible in the terminal.

submitted by /u/Popular-Spirit1306
[link] [comments]  (Tldr at bottom since this is a ramble)I tried making a simple program to let me know when my internet connection came back online. It was supposed to do a “ping google.com” with a shibang, and if there was no output after 10 seconds, wait 30 seconds and loop again. If it did receive packets, then it would run a “figlet online” in the terminal and exit. Super simple, but I don’t know how to capture or interpret shell output in a python script and it was also not displaying any of the command outputs in my terminal. Sorry if this is rambly Tldr: how do I run shell, capture shell output as a variable, and run commands who’s output is visible in the terminal. submitted by /u/Popular-Spirit1306 [link] [comments]

Read more

Looking for project suggestions /u/permanentburner89 Python Education

Looking for project suggestions /u/permanentburner89 Python Education

I’m an intermediate (ish) Python developer comfortable with practical tools like UI-driven generators, parsers, and financial applications. I’m looking for project recommendations that involve scalable, real-world use cases where I can deepen my OOP knowledge, explore library ecosystems, and improve collaboration skills through Git… Or whatever you all think is important for real world development. I’m not necessarily looking to land a job at a corporation, more interested in simply being capable.

Suggestions for growth areas like optimization and multithreading are also welcome.

Thank you in advance.

submitted by /u/permanentburner89
[link] [comments]

​r/learnpython I’m an intermediate (ish) Python developer comfortable with practical tools like UI-driven generators, parsers, and financial applications. I’m looking for project recommendations that involve scalable, real-world use cases where I can deepen my OOP knowledge, explore library ecosystems, and improve collaboration skills through Git… Or whatever you all think is important for real world development. I’m not necessarily looking to land a job at a corporation, more interested in simply being capable. Suggestions for growth areas like optimization and multithreading are also welcome. Thank you in advance. submitted by /u/permanentburner89 [link] [comments] 

I’m an intermediate (ish) Python developer comfortable with practical tools like UI-driven generators, parsers, and financial applications. I’m looking for project recommendations that involve scalable, real-world use cases where I can deepen my OOP knowledge, explore library ecosystems, and improve collaboration skills through Git… Or whatever you all think is important for real world development. I’m not necessarily looking to land a job at a corporation, more interested in simply being capable.

Suggestions for growth areas like optimization and multithreading are also welcome.

Thank you in advance.

submitted by /u/permanentburner89
[link] [comments]  I’m an intermediate (ish) Python developer comfortable with practical tools like UI-driven generators, parsers, and financial applications. I’m looking for project recommendations that involve scalable, real-world use cases where I can deepen my OOP knowledge, explore library ecosystems, and improve collaboration skills through Git… Or whatever you all think is important for real world development. I’m not necessarily looking to land a job at a corporation, more interested in simply being capable. Suggestions for growth areas like optimization and multithreading are also welcome. Thank you in advance. submitted by /u/permanentburner89 [link] [comments]

Read more

update firewall rule with duck dns ip /u/Altruistic-Pea-6821 Python Education

update firewall rule with duck dns ip /u/Altruistic-Pea-6821 Python Education

I don’t know python, but hope someone can help me or refer me to a different subreddit. basically i have a rule in simplewall. I want this automated script to get the ip from duck dns and change the ip in the firewall rule.

submitted by /u/Altruistic-Pea-6821
[link] [comments]

​r/learnpython I don’t know python, but hope someone can help me or refer me to a different subreddit. basically i have a rule in simplewall. I want this automated script to get the ip from duck dns and change the ip in the firewall rule. submitted by /u/Altruistic-Pea-6821 [link] [comments] 

I don’t know python, but hope someone can help me or refer me to a different subreddit. basically i have a rule in simplewall. I want this automated script to get the ip from duck dns and change the ip in the firewall rule.

submitted by /u/Altruistic-Pea-6821
[link] [comments]  I don’t know python, but hope someone can help me or refer me to a different subreddit. basically i have a rule in simplewall. I want this automated script to get the ip from duck dns and change the ip in the firewall rule. submitted by /u/Altruistic-Pea-6821 [link] [comments]

Read more

Can’t install ccxt package with pip /u/Martinculo Python Education

Can’t install ccxt package with pip /u/Martinculo Python Education

Pip version is pip 24.3.1, Python version is 3.11.9.

Any help?

I tried install cffi via pip with similar results, I tried installing
cffi via wheel, with no success, same trying to install cryptography.
pip install ccxt –upgrade has no results too, same error. I installed
rust. Tried to use the command in a virtual environment, but I can’t
access the environment. I also have the latest Visual Studio installed,
with “c++ desktop application” pack installed.
Got suggested to try
pip install –only-binary :all: cffi
and
pip install –no-cache-dir ccxt
Sadly none of the solution worked, for pip install –only-binary :all: cffi the response was: ERROR: Could not find a version that satisfies the requirement cffi (from versions: none) ERROR: No matching distribution found for cffi And for pip install –no-cache-dir ccxt the error was the same coming up by just writing pip install ccxt.

I tried to install it via pip install ccxt on Windows 11, but I got the following error:

Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error "not MSVC" 2 | #error "not MSVC" | ^~~~~ Note: will not use '__thread' in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building '_cffi_backend' extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function 'b_do_dlopen': src/c/_cffi_backend.c:4568:40: error: passing argument 1 of 'PyUnicode_AsWideChar' from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyUnicodeObject *' 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command 'C:\msys64\mingw64\bin\gcc.EXE' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error "not MSVC" 2 | #error "not MSVC" | ^~~~~ Note: will not use '__thread' in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building '_cffi_backend' extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function 'b_do_dlopen': src/c/_cffi_backend.c:4568:40: error: passing argument 1 of 'PyUnicode_AsWideChar' from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyUnicodeObject *' 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command 'C:\msys64\mingw64\bin\gcc.EXE' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. 

submitted by /u/Martinculo
[link] [comments]

​r/learnpython Pip version is pip 24.3.1, Python version is 3.11.9. Any help? I tried install cffi via pip with similar results, I tried installing cffi via wheel, with no success, same trying to install cryptography. pip install ccxt –upgrade has no results too, same error. I installed rust. Tried to use the command in a virtual environment, but I can’t access the environment. I also have the latest Visual Studio installed, with “c++ desktop application” pack installed. Got suggested to try pip install –only-binary :all: cffi and pip install –no-cache-dir ccxt Sadly none of the solution worked, for pip install –only-binary :all: cffi the response was: ERROR: Could not find a version that satisfies the requirement cffi (from versions: none) ERROR: No matching distribution found for cffi And for pip install –no-cache-dir ccxt the error was the same coming up by just writing pip install ccxt. I tried to install it via pip install ccxt on Windows 11, but I got the following error: Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies … error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status ‘done’ Getting requirements to build wheel: started Getting requirements to build wheel: finished with status ‘done’ Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status ‘done’ Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status ‘error’ error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error “not MSVC” 2 | #error “not MSVC” | ^~~~~ Note: will not use ‘__thread’ in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building ‘_cffi_backend’ extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function ‘b_do_dlopen’: src/c/_cffi_backend.c:4568:40: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’ 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command ‘C:\msys64\mingw64\bin\gcc.EXE’ failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies … error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status ‘done’ Getting requirements to build wheel: started Getting requirements to build wheel: finished with status ‘done’ Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status ‘done’ Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status ‘error’ error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error “not MSVC” 2 | #error “not MSVC” | ^~~~~ Note: will not use ‘__thread’ in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building ‘_cffi_backend’ extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function ‘b_do_dlopen’: src/c/_cffi_backend.c:4568:40: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’ 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command ‘C:\msys64\mingw64\bin\gcc.EXE’ failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. submitted by /u/Martinculo [link] [comments] 

Pip version is pip 24.3.1, Python version is 3.11.9.

Any help?

I tried install cffi via pip with similar results, I tried installing
cffi via wheel, with no success, same trying to install cryptography.
pip install ccxt –upgrade has no results too, same error. I installed
rust. Tried to use the command in a virtual environment, but I can’t
access the environment. I also have the latest Visual Studio installed,
with “c++ desktop application” pack installed.
Got suggested to try
pip install –only-binary :all: cffi
and
pip install –no-cache-dir ccxt
Sadly none of the solution worked, for pip install –only-binary :all: cffi the response was: ERROR: Could not find a version that satisfies the requirement cffi (from versions: none) ERROR: No matching distribution found for cffi And for pip install –no-cache-dir ccxt the error was the same coming up by just writing pip install ccxt.

I tried to install it via pip install ccxt on Windows 11, but I got the following error:

Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error "not MSVC" 2 | #error "not MSVC" | ^~~~~ Note: will not use '__thread' in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building '_cffi_backend' extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function 'b_do_dlopen': src/c/_cffi_backend.c:4568:40: error: passing argument 1 of 'PyUnicode_AsWideChar' from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyUnicodeObject *' 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command 'C:\msys64\mingw64\bin\gcc.EXE' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error "not MSVC" 2 | #error "not MSVC" | ^~~~~ Note: will not use '__thread' in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building '_cffi_backend' extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function 'b_do_dlopen': src/c/_cffi_backend.c:4568:40: error: passing argument 1 of 'PyUnicode_AsWideChar' from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyUnicodeObject *' 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command 'C:\msys64\mingw64\bin\gcc.EXE' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. 

submitted by /u/Martinculo
[link] [comments]  Pip version is pip 24.3.1, Python version is 3.11.9. Any help? I tried install cffi via pip with similar results, I tried installing cffi via wheel, with no success, same trying to install cryptography. pip install ccxt –upgrade has no results too, same error. I installed rust. Tried to use the command in a virtual environment, but I can’t access the environment. I also have the latest Visual Studio installed, with “c++ desktop application” pack installed. Got suggested to try pip install –only-binary :all: cffi and pip install –no-cache-dir ccxt Sadly none of the solution worked, for pip install –only-binary :all: cffi the response was: ERROR: Could not find a version that satisfies the requirement cffi (from versions: none) ERROR: No matching distribution found for cffi And for pip install –no-cache-dir ccxt the error was the same coming up by just writing pip install ccxt. I tried to install it via pip install ccxt on Windows 11, but I got the following error: Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies … error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status ‘done’ Getting requirements to build wheel: started Getting requirements to build wheel: finished with status ‘done’ Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status ‘done’ Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status ‘error’ error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error “not MSVC” 2 | #error “not MSVC” | ^~~~~ Note: will not use ‘__thread’ in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building ‘_cffi_backend’ extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function ‘b_do_dlopen’: src/c/_cffi_backend.c:4568:40: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’ 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command ‘C:\msys64\mingw64\bin\gcc.EXE’ failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.Collecting ccxt Downloading ccxt-4.4.40-py2.py3-none-any.whl.metadata (116 kB) Requirement already satisfied: setuptools>=60.9.0 in c:msys64mingw64libpython3.11site-packages (from ccxt) (75.6.0) Requirement already satisfied: certifi>=2018.1.18 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2024.8.30) Requirement already satisfied: requests>=2.18.4 in c:msys64mingw64libpython3.11site-packages (from ccxt) (2.32.3) Collecting cryptography>=2.6.1 (from ccxt) Using cached cryptography-44.0.0.tar.gz (710 kB) Installing build dependencies … error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [79 lines of output] Collecting maturin<2,>=1 Using cached maturin-1.7.8-cp311-cp311-mingw_x86_64.whl Collecting cffi>=1.12 Using cached cffi-1.17.1.tar.gz (516 kB) Installing build dependencies: started Installing build dependencies: finished with status ‘done’ Getting requirements to build wheel: started Getting requirements to build wheel: finished with status ‘done’ Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status ‘done’ Collecting setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2 Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Collecting pycparser (from cffi>=1.12) Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Using cached pycparser-2.22-py3-none-any.whl (117 kB) Building wheels for collected packages: cffi Building wheel for cffi (pyproject.toml): started Building wheel for cffi (pyproject.toml): finished with status ‘error’ error: subprocess-exited-with-error Building wheel for cffi (pyproject.toml) did not run successfully. exit code: 1 [48 lines of output] _configtest.c:2:2: error: #error “not MSVC” 2 | #error “not MSVC” | ^~~~~ Note: will not use ‘__thread’ in the C code ***** The above error message can be safely ignored. running bdist_wheel running build running build_py creating buildlib.mingw_x86_64-cpython-311cffi copying srccffiapi.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffibackend_ctypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficffi_opcode.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficommontypes.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccfficparser.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffierror.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiffiplatform.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffilock.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffimodel.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffipkgconfig.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffirecompiler.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffisetuptools_ext.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_cpy.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffivengine_gen.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiverifier.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_imp_emulation.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_shimmed_dist_utils.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi__init__.py -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_include.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffiparse_c_type.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_embedding.h -> buildlib.mingw_x86_64-cpython-311cffi copying srccffi_cffi_errors.h -> buildlib.mingw_x86_64-cpython-311cffi running build_ext building ‘_cffi_backend’ extension creating buildtemp.mingw_x86_64-cpython-311srcc gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -IC:msys64mingw64/include/python3.11 -c src/c/_cffi_backend.c -o buildtemp.mingw_x86_64-cpython-311srcc_cffi_backend.o src/c/_cffi_backend.c: In function ‘b_do_dlopen’: src/c/_cffi_backend.c:4568:40: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types] 4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from C:msys64mingw64/include/python3.11/Python.h:51, from src/c/_cffi_backend.c:2: C:msys64mingw64/include/python3.11/unicodeobject.h:299:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’ 299 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ error: command ‘C:\msys64\mingw64\bin\gcc.EXE’ failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Failed to build cffi ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. submitted by /u/Martinculo [link] [comments]

Read more