Cannot install web3py in Pycharm, linux machine - python

having problems installing web3 package in Pycharm. I am old and clueless when it comes to package installations. The same errors occur either through pip install or interpreter settings/add package. I do not know what else to try and stackoverflow is giving me an error because it says I need to add more details.
OS: Linux Mint 20.1
Pycharm: 2021.1.3
Python: 3.8.10
This answer worked:
"You have to install apt install python3.8-dev –
furas
"
Collecting web3
Using cached web3-5.28.0-py3-none-any.whl (499 kB)
Collecting eth-utils<2.0.0,>=1.9.5
Using cached eth_utils-1.10.0-py3-none-any.whl (24 kB)
Collecting aiohttp<4,>=3.7.4.post0
Using cached aiohttp-3.8.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.3 MB)
Collecting lru-dict<2.0.0,>=1.1.6
Using cached lru-dict-1.1.7.tar.gz (10 kB)
Preparing metadata (setup.py) ... done
Collecting hexbytes<1.0.0,>=0.1.0
Using cached hexbytes-0.2.2-py3-none-any.whl (6.1 kB)
Requirement already satisfied: requests<3.0.0,>=2.16.0 in /usr/lib/python3/dist-packages (from web3) (2.22.0)
Collecting eth-abi<3.0.0,>=2.0.0b6
Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
Collecting ipfshttpclient==0.8.0a2
Using cached ipfshttpclient-0.8.0a2-py3-none-any.whl (82 kB)
Collecting eth-account<0.6.0,>=0.5.7
Using cached eth_account-0.5.7-py3-none-any.whl (101 kB)
Collecting jsonschema<4.0.0,>=3.2.0
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting protobuf<4,>=3.10.0
Using cached protobuf-3.19.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
Collecting eth-hash[pycryptodome]<1.0.0,>=0.2.0
Using cached eth_hash-0.3.2-py3-none-any.whl (8.8 kB)
Collecting eth-typing<3.0.0,>=2.0.0
Using cached eth_typing-2.3.0-py3-none-any.whl (6.2 kB)
Collecting websockets<10,>=9.1
Using cached websockets-9.1-cp38-cp38-manylinux2010_x86_64.whl (102 kB)
Collecting multiaddr>=0.0.7
Using cached multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
Collecting attrs>=17.3.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting frozenlist>=1.1.1
Using cached frozenlist-1.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (158 kB)
Collecting async-timeout<5.0,>=4.0.0a3
Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting yarl<2.0,>=1.0
Using cached yarl-1.7.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (308 kB)
Collecting charset-normalizer<3.0,>=2.0
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting aiosignal>=1.1.2
Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting multidict<7.0,>=4.5
Using cached multidict-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (121 kB)
Collecting parsimonious<0.9.0,>=0.8.0
Using cached parsimonious-0.8.1-py3-none-any.whl
Collecting eth-rlp<2,>=0.1.2
Using cached eth_rlp-0.3.0-py3-none-any.whl (5.0 kB)
Collecting eth-keys<0.4.0,>=0.3.4
Using cached eth_keys-0.3.4-py3-none-any.whl (21 kB)
Collecting rlp<3,>=1.0.0
Using cached rlp-2.0.1-py2.py3-none-any.whl (20 kB)
Collecting bitarray<1.3.0,>=1.2.1
Using cached bitarray-1.2.2.tar.gz (48 kB)
Preparing metadata (setup.py) ... done
Collecting eth-keyfile<0.6.0,>=0.5.0
Using cached eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
Collecting pycryptodome<4,>=3.6.6
Using cached pycryptodome-3.14.1-cp35-abi3-manylinux2010_x86_64.whl (2.0 MB)
Collecting cytoolz<1.0.0,>=0.10.1
Using cached cytoolz-0.11.2.tar.gz (481 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: six>=1.11.0 in /usr/lib/python3/dist-packages (from jsonschema<4.0.0,>=3.2.0->web3) (1.14.0)
Collecting pyrsistent>=0.14.0
Using cached pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (119 kB)
Requirement already satisfied: setuptools in ./venv/lib/python3.8/site-packages (from jsonschema<4.0.0,>=3.2.0->web3) (60.9.3)
Requirement already satisfied: toolz>=0.8.0 in ./venv/lib/python3.8/site-packages (from cytoolz<1.0.0,>=0.10.1->eth-utils<2.0.0,>=1.9.5->web3) (0.11.2)
Collecting eth-rlp<2,>=0.1.2
Using cached eth_rlp-0.2.1-py3-none-any.whl (5.0 kB)
Requirement already satisfied: varint in ./venv/lib/python3.8/site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3) (1.0.2)
Collecting base58
Using cached base58-2.1.1-py3-none-any.whl (5.6 kB)
Requirement already satisfied: netaddr in ./venv/lib/python3.8/site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3) (0.8.0)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp<4,>=3.7.4.post0->web3) (2.8)
Building wheels for collected packages: lru-dict, bitarray, cytoolz
Building wheel for lru-dict (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
running build
running build_ext
building 'lru' extension
creating build
creating build/temp.linux-x86_64-3.8
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/bs/PycharmProjects/SOLIDITY_TESTING/venv/include -I/usr/include/python3.8 -c lru.c -o build/temp.linux-x86_64-3.8/lru.o
lru.c:1:10: fatal error: Python.h: No such file or directory
1 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' 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 lru-dict
Running setup.py clean for lru-dict
Building wheel for bitarray (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/bitarray
copying bitarray/test_bitarray.py -> build/lib.linux-x86_64-3.8/bitarray
copying bitarray/__init__.py -> build/lib.linux-x86_64-3.8/bitarray
copying bitarray/test_util.py -> build/lib.linux-x86_64-3.8/bitarray
copying bitarray/util.py -> build/lib.linux-x86_64-3.8/bitarray
running build_ext
building 'bitarray._bitarray' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/bitarray
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/bs/PycharmProjects/SOLIDITY_TESTING/venv/include -I/usr/include/python3.8 -c bitarray/_bitarray.c -o build/temp.linux-x86_64-3.8/bitarray/_bitarray.o
bitarray/_bitarray.c:12:10: fatal error: Python.h: No such file or directory
12 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' 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 bitarray
Running setup.py clean for bitarray
Building wheel for cytoolz (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [60 lines of output]
[1/5] Cythonizing cytoolz/utils.pyx
[2/5] Cythonizing cytoolz/dicttoolz.pyx
[3/5] Cythonizing cytoolz/functoolz.pyx
[4/5] Cythonizing cytoolz/itertoolz.pyx
[5/5] Cythonizing cytoolz/recipes.pyx
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/_version.py -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/__init__.py -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/_signatures.py -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/compatibility.py -> build/lib.linux-x86_64-3.8/cytoolz
creating build/lib.linux-x86_64-3.8/cytoolz/curried
copying cytoolz/curried/exceptions.py -> build/lib.linux-x86_64-3.8/cytoolz/curried
copying cytoolz/curried/__init__.py -> build/lib.linux-x86_64-3.8/cytoolz/curried
copying cytoolz/curried/operator.py -> build/lib.linux-x86_64-3.8/cytoolz/curried
copying cytoolz/dicttoolz.pyx -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/utils.pyx -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/recipes.pyx -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/itertoolz.pyx -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/functoolz.pyx -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/itertoolz.pxd -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/dicttoolz.pxd -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/utils.pxd -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/recipes.pxd -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/cpython.pxd -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/functoolz.pxd -> build/lib.linux-x86_64-3.8/cytoolz
copying cytoolz/__init__.pxd -> build/lib.linux-x86_64-3.8/cytoolz
creating build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_curried_toolzlike.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_serialization.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_functoolz.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_docstrings.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_recipes.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_dicttoolz.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_curried.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_dev_skip_test.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_utils.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_inspect_args.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_itertoolz.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_compatibility.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_signatures.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_none_safe.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_embedded_sigs.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/dev_skip_test.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_doctests.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
copying cytoolz/tests/test_tlz.py -> build/lib.linux-x86_64-3.8/cytoolz/tests
running build_ext
building 'cytoolz.dicttoolz' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/cytoolz
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/bs/PycharmProjects/SOLIDITY_TESTING/venv/include -I/usr/include/python3.8 -c cytoolz/dicttoolz.c -o build/temp.linux-x86_64-3.8/cytoolz/dicttoolz.o
cytoolz/dicttoolz.c:19:10: fatal error: Python.h: No such file or directory
19 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' 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 cytoolz
Running setup.py clean for cytoolz
Failed to build lru-dict bitarray cytoolz
Installing collected packages: lru-dict, bitarray, websockets, pyrsistent, pycryptodome, protobuf, parsimonious, multidict, hexbytes, frozenlist, eth-typing, eth-hash, cytoolz, charset-normalizer, base58, attrs, async-timeout, yarl, multiaddr, jsonschema, eth-utils, aiosignal, rlp, ipfshttpclient, eth-keys, eth-abi, aiohttp, eth-rlp, eth-keyfile, eth-account, web3
Running setup.py install for lru-dict ... error
error: subprocess-exited-with-error
× Running setup.py install for lru-dict did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running install
/home/bs/PycharmProjects/SOLIDITY_TESTING/venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
building 'lru' extension
creating build
creating build/temp.linux-x86_64-3.8
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/bs/PycharmProjects/SOLIDITY_TESTING/venv/include -I/usr/include/python3.8 -c lru.c -o build/temp.linux-x86_64-3.8/lru.o
lru.c:1:10: fatal error: Python.h: No such file or directory
1 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
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.
╰─> lru-dict
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

In error you can see
Python.h: No such file or directory
and it means it compiles some C/C++ code and it needs C/C++ headers for Python source code.
You have to install
apt install python3.8-dev

Related

I can't install pyimgui library on fedora

I'm using fedora 36. I tried the install pyimgui python library like its github page.
sudo pip install imgui[full]
But this error occured and I don't know what should I do?
[mehmed-irumi#fedora ~]$ sudo pip install imgui[full]
Collecting imgui[full]
Using cached imgui-1.4.1.tar.gz (855 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting Cython<0.30,>=0.24
Using cached Cython-0.29.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting cocos2d
Downloading cocos2d-0.6.9.tar.gz (4.7 MB)
|████████████████████████████████| 4.7 MB 2.6 MB/s
Preparing metadata (setup.py) ... done
Collecting pygame
Downloading pygame-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.9 MB)
|████████████████████████████████| 21.9 MB 4.0 MB/s
Collecting pyglet
Downloading pyglet-1.5.27-py3-none-any.whl (1.1 MB)
|████████████████████████████████| 1.1 MB 3.0 MB/s
Collecting PySDL2
Downloading PySDL2-0.9.14.tar.gz (761 kB)
|████████████████████████████████| 761 kB 519 kB/s
Preparing metadata (setup.py) ... done
Collecting glfw
Using cached glfw-2.5.5-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-manylinux2014_x86_64.whl (207 kB)
Collecting PyOpenGL
Using cached PyOpenGL-3.1.6-py3-none-any.whl (2.4 MB)
Requirement already satisfied: six>=1.4 in /usr/lib/python3.10/site-packages (from cocos2d->imgui[full]) (1.16.0)
Using legacy 'setup.py install' for cocos2d, since package 'wheel' is not installed.
Using legacy 'setup.py install' for PySDL2, since package 'wheel' is not installed.
Building wheels for collected packages: imgui
Building wheel for imgui (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmps2y8h5jz
cwd: /tmp/pip-install-budlaqg2/imgui_ab804ce65070444b94002609ea8c56db
Complete output (39 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/imgui
copying imgui/extra.py -> build/lib.linux-x86_64-3.10/imgui
copying imgui/_compat.py -> build/lib.linux-x86_64-3.10/imgui
copying imgui/__init__.py -> build/lib.linux-x86_64-3.10/imgui
creating build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/sdl2.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/pyglet.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/pygame.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/opengl.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/glumpy.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/glfw.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/cocos2d.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/base.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/__init__.py -> build/lib.linux-x86_64-3.10/imgui/integrations
running egg_info
no previously-included directories found matching 'imgui-cpp/examples'
no previously-included directories found matching 'imgui-cpp/extra_fonts'
writing manifest file 'imgui.egg-info/SOURCES.txt'
copying imgui/ansifeed.pxd -> build/lib.linux-x86_64-3.10/imgui
copying imgui/cimgui.pxd -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.cpp -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.h -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.pxd -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.pyx -> build/lib.linux-x86_64-3.10/imgui
copying imgui/enums.pxd -> build/lib.linux-x86_64-3.10/imgui
running build_ext
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/config-cpp
creating build/temp.linux-x86_64-3.10/imgui-cpp
creating build/temp.linux-x86_64-3.10/imgui
gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYIMGUI_CUSTOM_EXCEPTION -Iimgui-cpp -Iansifeed-cpp -I./imgui -Iimgui -Iconfig-cpp -I/usr/include/python3.10 -c config-cpp/py_imconfig.cpp -o build/temp.linux-x86_64-3.10/config-cpp/py_imconfig.o -includeconfig-cpp/py_imconfig.h
gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for imgui
Failed to build imgui
ERROR: Could not build wheels for imgui, which is required to install pyproject.toml-based projects
[mehmed-irumi#fedora ~]$ sudo pip3 install imgui[full]
Collecting imgui[full]
Using cached imgui-1.4.1.tar.gz (855 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyglet
Using cached pyglet-1.5.27-py3-none-any.whl (1.1 MB)
Collecting pygame
Using cached pygame-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.9 MB)
Collecting PySDL2
Using cached PySDL2-0.9.14.tar.gz (761 kB)
Preparing metadata (setup.py) ... done
Collecting cocos2d
Using cached cocos2d-0.6.9.tar.gz (4.7 MB)
Preparing metadata (setup.py) ... done
Collecting Cython<0.30,>=0.24
Using cached Cython-0.29.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting PyOpenGL
Using cached PyOpenGL-3.1.6-py3-none-any.whl (2.4 MB)
Collecting glfw
Using cached glfw-2.5.5-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-manylinux2014_x86_64.whl (207 kB)
Requirement already satisfied: six>=1.4 in /usr/lib/python3.10/site-packages (from cocos2d->imgui[full]) (1.16.0)
Using legacy 'setup.py install' for cocos2d, since package 'wheel' is not installed.
Using legacy 'setup.py install' for PySDL2, since package 'wheel' is not installed.
Building wheels for collected packages: imgui
Building wheel for imgui (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpetpxf412
cwd: /tmp/pip-install-u5lufgjv/imgui_303b3356d2ca4eee89926439e8a62011
Complete output (39 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/imgui
copying imgui/extra.py -> build/lib.linux-x86_64-3.10/imgui
copying imgui/_compat.py -> build/lib.linux-x86_64-3.10/imgui
copying imgui/__init__.py -> build/lib.linux-x86_64-3.10/imgui
creating build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/sdl2.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/pyglet.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/pygame.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/opengl.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/glumpy.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/glfw.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/cocos2d.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/base.py -> build/lib.linux-x86_64-3.10/imgui/integrations
copying imgui/integrations/__init__.py -> build/lib.linux-x86_64-3.10/imgui/integrations
running egg_info
no previously-included directories found matching 'imgui-cpp/examples'
no previously-included directories found matching 'imgui-cpp/extra_fonts'
writing manifest file 'imgui.egg-info/SOURCES.txt'
copying imgui/ansifeed.pxd -> build/lib.linux-x86_64-3.10/imgui
copying imgui/cimgui.pxd -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.cpp -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.h -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.pxd -> build/lib.linux-x86_64-3.10/imgui
copying imgui/core.pyx -> build/lib.linux-x86_64-3.10/imgui
copying imgui/enums.pxd -> build/lib.linux-x86_64-3.10/imgui
running build_ext
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/config-cpp
creating build/temp.linux-x86_64-3.10/imgui-cpp
creating build/temp.linux-x86_64-3.10/imgui
gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYIMGUI_CUSTOM_EXCEPTION -Iimgui-cpp -Iansifeed-cpp -I./imgui -Iimgui -Iconfig-cpp -I/usr/include/python3.10 -c config-cpp/py_imconfig.cpp -o build/temp.linux-x86_64-3.10/config-cpp/py_imconfig.o -includeconfig-cpp/py_imconfig.h
gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for imgui
Failed to build imgui
ERROR: Could not build wheels for imgui, which is required to install pyproject.toml-based projects
Because pip would be just about the same on Linux and on Windows, have you tried a virtual environment? Otherwise you might just be using a crappy package, or at the very least it doesn't work on Linux.
For Linux, it's recommended to use virtual environments for developing anyway, since conflicting packages might accrued problems with the base installation, which is detrimental to your Linux system.
EDIT:
Looking at the traceback in more detail, the problem seems to be gcc. Do you know if your current version is compatible with the package.
ANOTHER EDIT: It seems to say things about C++, not just C. Maybe the problem is g++, not gcc?

How to install web3 on vscode without having all these issues?

here is the code I'm trying to run (from Patric's course), please consider that this is my first time into coding and it has been two weeks trying to solve this issue !
from solcx import compile_standard from web3 import Web3 import json
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
Solidity source code compiled_sol = compile_standard(
{
"language": "Solidity",
"sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
"settings": {
"outputSelection": {
"*": {
"*": ["abi", "metadata", "evm.bytecode", "evm.bytecode.sourceMap"]
}
}
},
},
solc_version="0.6.0", )
with open("compiled_code.json", "w") as file:
json.dump(compiled_sol, file)
get bytecode bytecode = compiled_sol["contracts"]["SimpleStorage.sol"]["SimpleStorage"]["evm"][
"bytecode" ]["object"]
get abi abi = compiled_sol["contracts"]["SimpleStorage.sol"]["SimpleStorage"]["abi"]
connecting to ganach w3 = Web3(Web3.HTTPProvider("http://127.0.0.1:7545")) chaind_id = 5777
my_address = "0xa1d2a440E4E75bcA442107162DE8C276D637a0eF" 'private_key
= os.getenv("0x170ab1d384e1d218ccd8ec332dfa334f8e9980f008043ff04e99a8154322bf06")
cteating the contract in python SimpleStorage = w3.eth.contract(abi=abi, bytecode=bytecode) print(SimpleStorage)
I tried all the solution I found; installed cyphon, installed legacy but nothing changed.
and this is was I see on the terminator:
PS C:\Users\raouf\demos\web3_py_simple_storage> pip --version
pip 22.0.4 from C:\Users\raouf\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)
PS C:\Users\raouf\demos\web3_py_simple_storage> python --version
Python 3.10.4
PS C:\Users\raouf\demos\web3_py_simple_storage> pip install web3
Collecting web3
Using cached web3-5.29.1-py3-none-any.whl (500 kB)
Collecting aiohttp<4,>=3.7.4.post0
Using cached aiohttp-3.8.1-cp310-cp310-win_amd64.whl (555 kB)
Collecting eth-abi<3.0.0,>=2.0.0b6
Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
Collecting jsonschema<5,>=3.2.0
Using cached jsonschema-4.5.1-py3-none-any.whl (72 kB)
Collecting eth-utils<2.0.0,>=1.9.5
Using cached eth_utils-1.10.0-py3-none-any.whl (24 kB)
Collecting eth-hash[pycryptodome]<1.0.0,>=0.2.0
Using cached eth_hash-0.3.2-py3-none-any.whl (8.8 kB)
Collecting eth-account<0.6.0,>=0.5.7
Using cached eth_account-0.5.7-py3-none-any.whl (101 kB)
Collecting hexbytes<1.0.0,>=0.1.0
Using cached hexbytes-0.2.2-py3-none-any.whl (6.1 kB)
Collecting eth-typing<3.0.0,>=2.0.0
Using cached eth_typing-2.3.0-py3-none-any.whl (6.2 kB)
Collecting websockets<10,>=9.1
Using cached websockets-9.1-cp310-cp310-win_amd64.whl
Requirement already satisfied: pywin32>=223 in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from web3) (304)
Collecting lru-dict<2.0.0,>=1.1.6
Using cached lru-dict-1.1.7.tar.gz (10 kB)
Preparing metadata (setup.py) ... done
Collecting protobuf<4,>=3.10.0
Using cached protobuf-3.20.1-cp310-cp310-win_amd64.whl (903 kB)
Collecting ipfshttpclient==0.8.0a2
Using cached ipfshttpclient-0.8.0a2-py3-none-any.whl (82 kB)
Requirement already satisfied: requests<3.0.0,>=2.16.0 in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from web3) (2.27.1)
Collecting multiaddr>=0.0.7
Using cached multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
Collecting aiosignal>=1.1.2
Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting async-timeout<5.0,>=4.0.0a3
Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting yarl<2.0,>=1.0
Using cached yarl-1.7.2-cp310-cp310-win_amd64.whl (122 kB)
Collecting attrs>=17.3.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from aiohttp<4,>=3.7.4.post0->web3) (2.0.12)
Collecting multidict<7.0,>=4.5
Using cached multidict-6.0.2-cp310-cp310-win_amd64.whl (27 kB)
Collecting frozenlist>=1.1.1
Using cached frozenlist-1.3.0-cp310-cp310-win_amd64.whl (33 kB)
Collecting parsimonious<0.9.0,>=0.8.0
Using cached parsimonious-0.8.1-py3-none-any.whl
Collecting eth-keyfile<0.6.0,>=0.5.0
Using cached eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
Collecting eth-keys<0.4.0,>=0.3.4
Using cached eth_keys-0.3.4-py3-none-any.whl (21 kB)
Collecting rlp<3,>=1.0.0
Using cached rlp-2.0.1-py2.py3-none-any.whl (20 kB)
Collecting eth-rlp<2,>=0.1.2
Using cached eth_rlp-0.3.0-py3-none-any.whl (5.0 kB)
Collecting bitarray<1.3.0,>=1.2.1
Using cached bitarray-1.2.2.tar.gz (48 kB)
Preparing metadata (setup.py) ... done
Collecting pycryptodome<4,>=3.6.6
Using cached pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting cytoolz<1.0.0,>=0.10.1
Using cached cytoolz-0.11.2.tar.gz (481 kB)
Preparing metadata (setup.py) ... done
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Using cached pyrsistent-0.18.1-cp310-cp310-win_amd64.whl (61 kB)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.16.0->web3) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.16.0->web3) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.16.0->web3) (1.26.9)
Collecting toolz>=0.8.0
Using cached toolz-0.11.2-py3-none-any.whl (55 kB)
Collecting eth-rlp<2,>=0.1.2
Using cached eth_rlp-0.2.1-py3-none-any.whl (5.0 kB)
Requirement already satisfied: varint in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3) (1.0.2)
Collecting base58
Using cached base58-2.1.1-py3-none-any.whl (5.6 kB)
Requirement already satisfied: netaddr in c:\users\raouf\appdata\local\programs\python\python310\lib\site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3) (0.8.0)
Collecting six
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: lru-dict, bitarray, cytoolz
Building wheel for lru-dict (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'lru' extension
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 lru-dict
Running setup.py clean for lru-dict
Building wheel for bitarray (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\bitarray
copying bitarray\test_bitarray.py -> build\lib.win-amd64-cpython-310\bitarray
copying bitarray\test_util.py -> build\lib.win-amd64-cpython-310\bitarray
copying bitarray\util.py -> build\lib.win-amd64-cpython-310\bitarray
copying bitarray\__init__.py -> build\lib.win-amd64-cpython-310\bitarray
running build_ext
building 'bitarray._bitarray' extension
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 bitarray
Running setup.py clean for bitarray
Building wheel for cytoolz (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [53 lines of output]
[1/5] Cythonizing cytoolz/utils.pyx
[2/5] Cythonizing cytoolz/dicttoolz.pyx
[3/5] Cythonizing cytoolz/functoolz.pyx
[4/5] Cythonizing cytoolz/itertoolz.pyx
[5/5] Cythonizing cytoolz/recipes.pyx
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\compatibility.py -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\_signatures.py -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\_version.py -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\__init__.py -> build\lib.win-amd64-cpython-310\cytoolz
creating build\lib.win-amd64-cpython-310\cytoolz\curried
copying cytoolz\curried\exceptions.py -> build\lib.win-amd64-cpython-310\cytoolz\curried
copying cytoolz\curried\operator.py -> build\lib.win-amd64-cpython-310\cytoolz\curried
copying cytoolz\curried\__init__.py -> build\lib.win-amd64-cpython-310\cytoolz\curried
copying cytoolz\dicttoolz.pyx -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\functoolz.pyx -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\itertoolz.pyx -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\recipes.pyx -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\utils.pyx -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\cpython.pxd -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\dicttoolz.pxd -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\functoolz.pxd -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\itertoolz.pxd -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\recipes.pxd -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\utils.pxd -> build\lib.win-amd64-cpython-310\cytoolz
copying cytoolz\__init__.pxd -> build\lib.win-amd64-cpython-310\cytoolz
creating build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\dev_skip_test.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_compatibility.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_curried.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_curried_toolzlike.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_dev_skip_test.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_dicttoolz.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_docstrings.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_doctests.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_embedded_sigs.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_functoolz.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_inspect_args.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_itertoolz.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_none_safe.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_recipes.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_serialization.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_signatures.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_tlz.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
copying cytoolz\tests\test_utils.py -> build\lib.win-amd64-cpython-310\cytoolz\tests
running build_ext
building 'cytoolz.dicttoolz' extension
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 cytoolz
Running setup.py clean for cytoolz
Failed to build lru-dict bitarray cytoolz
Installing collected packages: lru-dict, bitarray, websockets, toolz, six, pyrsistent, pycryptodome, protobuf, multidict, hexbytes, frozenlist, eth-typing, eth-hash, base58, attrs, async-timeout, yarl, parsimonious, multiaddr, jsonschema, cytoolz, aiosignal, ipfshttpclient, eth-utils, aiohttp, rlp,
eth-keys, eth-abi, eth-rlp, eth-keyfile, eth-account, web3
Running setup.py install for lru-dict ... error
error: subprocess-exited-with-error
× Running setup.py install for lru-dict did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running install
C:\Users\raouf\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
building 'lru' extension
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: legacy-install-failure
× Encountered error while trying to install package.
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Accoring to this line:
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]
You need to install Microsoft Visual C++ 14.0

tox refuses to use deps setting in py38 and various pip problems

I have a Django project that i'm trying to set up unit testing with tox in.
here is the directory structure:
+ djangoProject
|
+-.github
+-.pytest
+-.tox
+- api
+- blog
+- djangoProject
+- templates
|
+ .gitignore
+ manage.py
+ pyproject.toml
+ requirements.txt
+ requirements_dev.txt
+ setup.cfg
+ tox.ini
Here are the various config files
tox.ini:
[tox]
minversion = 3.8.0
envlist = py38, py39, py310, flake8
isolated_build = true
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
commands =
pytest --basetemp={envtmpdir}
[testenv:flake8]
basepython = python3.8
deps = flake8
commands = flake8
pyproject.toml:
[build-system]
requires = ["setuptools>=42.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
testpaths = [
"api",
"blog",
"djangoProject"
]
DJANGO_SETTINGS_MODULE = "djangoProject.settings"
python_files = "tests.py test_*.py *_tests.py"
setup.cfg:
[options]
packages =
api
blog
djangoProject
templates
[flake8]
max-line-length = 210
exclude =
.git,
.github,
.pytest_cache,
__pycache__,
docs/source/conf.py,
old,
build,
dist,
venv,
migrations
requirements_dev.txt:
Django~=4.0.3
djangorestframework~=3.13.1
django-gravatar2~=1.4.4
psycopg2~=2.9.3
beautifulsoup4~=4.10.0
pytest-django~=4.5.2
tox~=3.24.5
flake8~=4.0.1
I'm developing on Pycharm and Linux Mint 20.3 (in a HyperV VM)
Here is the output when I try to run tox:
(venv) dafrandle#linux-mint-VM:\~/PycharmProjects/djangoProject$ tox
py38 inst-nodeps: /home/dafrandle/PycharmProjects/djangoProject/.tox/.tmp/package/1/UNKNOWN-0.0.0.tar.gz
ERROR: invocation failed (exit code 1), logfile: /home/dafrandle/PycharmProjects/djangoProject/.tox/py38/log/py38-10.log
=============================================================================================================== log start ===============================================================================================================
Processing ./.tox/.tmp/package/1/UNKNOWN-0.0.0.tar.gz
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 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─\> \[6 lines of output\]
No parent package detected, impossible to derive `name`
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing top-level names to UNKNOWN.egg-info/top_level.txt
error: package directory 'templates' does not exist
\[end of output\]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
================================================================================================================ log end ================================================================================================================
py39 create: /home/dafrandle/PycharmProjects/djangoProject/.tox/py39
py39 installdeps: -r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt
ERROR: invocation failed (exit code 1), logfile: /home/dafrandle/PycharmProjects/djangoProject/.tox/py39/log/py39-1.log
=============================================================================================================== log start ===============================================================================================================
Collecting Django\~=4.0.3
Using cached Django-4.0.3-py3-none-any.whl (8.0 MB)
Collecting djangorestframework\~=3.13.1
Using cached djangorestframework-3.13.1-py3-none-any.whl (958 kB)
Collecting django-gravatar2\~=1.4.4
Using cached django_gravatar2-1.4.4-py2.py3-none-any.whl (7.9 kB)
Collecting psycopg2\~=2.9.3
Using cached psycopg2-2.9.3.tar.gz (380 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting beautifulsoup4\~=4.10.0
Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting pytest-django\~=4.5.2
Using cached pytest_django-4.5.2-py3-none-any.whl (20 kB)
Collecting tox\~=3.24.5
Using cached tox-3.24.5-py2.py3-none-any.whl (85 kB)
Collecting flake8\~=4.0.1
Using cached flake8-4.0.1-py2.py3-none-any.whl (64 kB)
Collecting asgiref\<4,\>=3.4.1
Using cached asgiref-3.5.0-py3-none-any.whl (22 kB)
Collecting sqlparse\>=0.2.2
Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting pytz
Using cached pytz-2022.1-py2.py3-none-any.whl (503 kB)
Collecting soupsieve\>1.2
Using cached soupsieve-2.3.1-py3-none-any.whl (37 kB)
Collecting pytest\>=5.4.0
Using cached pytest-7.1.1-py3-none-any.whl (297 kB)
Collecting virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,\>=16.0.0
Using cached virtualenv-20.14.0-py2.py3-none-any.whl (8.8 MB)
Collecting six\>=1.14.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting toml\>=0.9.4
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting packaging\>=14
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting py\>=1.4.17
Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting filelock\>=3.0.0
Using cached filelock-3.6.0-py3-none-any.whl (10.0 kB)
Collecting pluggy\>=0.12.0
Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting pycodestyle\<2.9.0,\>=2.8.0
Using cached pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB)
Collecting mccabe\<0.7.0,\>=0.6.0
Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting pyflakes\<2.5.0,\>=2.4.0
Using cached pyflakes-2.4.0-py2.py3-none-any.whl (69 kB)
Collecting pyparsing!=3.0.5,\>=2.0.2
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting tomli\>=1.0.0
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting iniconfig
Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting attrs\>=19.2.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting distlib\<1,\>=0.3.1
Using cached distlib-0.3.4-py2.py3-none-any.whl (461 kB)
Collecting platformdirs\<3,\>=2
Using cached platformdirs-2.5.1-py3-none-any.whl (14 kB)
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py): started
Building wheel for psycopg2 (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─\> \[38 lines of output\]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/psycopg2
copying lib/\_json.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/\_range.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/errors.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/\_ipaddress.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/extras.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/pool.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/__init__.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/errorcodes.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/tz.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/extensions.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/sql.py -\> build/lib.linux-x86_64-3.9/psycopg2
running build_ext
building 'psycopg2.\_psycopg' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC "-DPSYCOPG_VERSION=2.9.3 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=120009 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/home/dafrandle/PycharmProjects/djangoProject/.tox/py39/include -I/usr/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_asis.o -Wdeclaration-after-statement
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include \<Python.h\>
| ^\~\~\~\~\~\~\~\~\~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command '/usr/bin/x86_64-linux-gnu-gcc' 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 psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: pytz, mccabe, iniconfig, django-gravatar2, distlib, tomli, toml, sqlparse, soupsieve, six, pyparsing, pyflakes, pycodestyle, py, psycopg2, pluggy, platformdirs, filelock, attrs, asgiref, virtualenv, packaging, flake8, Django, beautifulsoup4, tox, pytest, djangorestframework, pytest-django
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for psycopg2 did not run successfully.
│ exit code: 1
╰─\> \[40 lines of output\]
running install
/home/dafrandle/PycharmProjects/djangoProject/.tox/py39/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/psycopg2
copying lib/\_json.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/\_range.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/errors.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/\_ipaddress.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/extras.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/pool.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/__init__.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/errorcodes.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/tz.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/extensions.py -\> build/lib.linux-x86_64-3.9/psycopg2
copying lib/sql.py -\> build/lib.linux-x86_64-3.9/psycopg2
running build_ext
building 'psycopg2.\_psycopg' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC "-DPSYCOPG_VERSION=2.9.3 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=120009 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/home/dafrandle/PycharmProjects/djangoProject/.tox/py39/include -I/usr/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_asis.o -Wdeclaration-after-statement
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include \<Python.h\>
| ^\~\~\~\~\~\~\~\~\~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
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.
╰─\> psycopg2
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
================================================================================================================ log end ================================================================================================================
ERROR: could not install deps \[-r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt\]; v = InvocationError('/home/dafrandle/PycharmProjects/djangoProject/.tox/py39/bin/python -m pip install -r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt', 1)
py310 create: /home/dafrandle/PycharmProjects/djangoProject/.tox/py310
py310 installdeps: -r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt
ERROR: invocation failed (exit code 1), logfile: /home/dafrandle/PycharmProjects/djangoProject/.tox/py310/log/py310-1.log
=============================================================================================================== log start ===============================================================================================================
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in \_run_module_as_main
return \_run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in \_run_code
exec(code, run_globals)
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/__main__.py", line 29, in \<module\>
from pip.\_internal.cli.main import main as \_main
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/cli/main.py", line 9, in \<module\>
from pip.\_internal.cli.autocompletion import autocomplete
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/cli/autocompletion.py", line 10, in \<module\>
from pip.\_internal.cli.main_parser import create_main_parser
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/cli/main_parser.py", line 8, in \<module\>
from pip.\_internal.cli import cmdoptions
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/cli/cmdoptions.py", line 23, in \<module\>
from pip.\_internal.cli.parser import ConfigOptionParser
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/cli/parser.py", line 12, in \<module\>
from pip.\_internal.configuration import Configuration, ConfigurationError
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/configuration.py", line 26, in \<module\>
from pip.\_internal.utils.logging import getLogger
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/utils/logging.py", line 27, in \<module\>
from pip.\_internal.utils.misc import ensure_dir
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/utils/misc.py", line 39, in \<module\>
from pip.\_internal.locations import get_major_minor_version
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/locations/__init__.py", line 14, in \<module\>
from . import \_distutils, \_sysconfig
File "/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/lib/python3.10/site-packages/pip/\_internal/locations/\_distutils.py", line 9, in \<module\>
from distutils.cmd import Command as DistutilsCommand
ModuleNotFoundError: No module named 'distutils.cmd'
================================================================================================================ log end ================================================================================================================
ERROR: could not install deps \[-r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt\]; v = InvocationError('/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/bin/python -m pip install -r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt', 1)
flake8 inst-nodeps: /home/dafrandle/PycharmProjects/djangoProject/.tox/.tmp/package/1/UNKNOWN-0.0.0.tar.gz
ERROR: invocation failed (exit code 1), logfile: /home/dafrandle/PycharmProjects/djangoProject/.tox/flake8/log/flake8-7.log
=============================================================================================================== log start ===============================================================================================================
Processing ./.tox/.tmp/package/1/UNKNOWN-0.0.0.tar.gz
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 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─\> \[6 lines of output\]
No parent package detected, impossible to derive `name`
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing top-level names to UNKNOWN.egg-info/top_level.txt
error: package directory 'templates' does not exist
\[end of output\]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
================================================================================================================ log end ================================================================================================================
\___\_ summary \___\_
ERROR: py38: InvocationError for command /home/dafrandle/PycharmProjects/djangoProject/.tox/py38/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/UNKNOWN-0.0.0.tar.gz (exited with code 1)
ERROR: py39: could not install deps \[-r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt\]; v = InvocationError('/home/dafrandle/PycharmProjects/djangoProject/.tox/py39/bin/python -m pip install -r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt', 1)
ERROR: py310: could not install deps \[-r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt\]; v = InvocationError('/home/dafrandle/PycharmProjects/djangoProject/.tox/py310/bin/python -m pip install -r/home/dafrandle/PycharmProjects/djangoProject/requirements_dev.txt', 1)
ERROR: flake8: InvocationError for command /home/dafrandle/PycharmProjects/djangoProject/.tox/flake8/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/UNKNOWN-0.0.0.tar.gz (exited with code 1)
their is multiple problems here
1: both py38 envs don't use my requirements and instead run pip with --no-deps and goes after some file that doesn't exist
2: in py38 envs the wheel fails to build - this is probably because of #1 but I'm not sure.
3: In all other envs the wheel for psycopg2 fails to build and it also fails to install using setup.py
I have tried removing lines from the tox.ini to get a different output to try and locate the issue if it was in the ini files but found nothing.
when I add things to my project with pip manually or using PyCharm's package manger inclduing psycopg2 it all works fine so I don't know why it wont work in tox
I don't know what I'm doing wrong
I was working off this tutorial video:
https://www.youtube.com/watch?v=DhUpxWjOhME
it's not for a Django project but everything before the tox part I was able to get running fine
This answer is an addendum to Jürgen's answer:
The cause of
py38 inst-nodeps: /home/dafrandle/PycharmProjects/djangoProject/.tox/.tmp/package/1/UNKNOWN-0.0.0.tar.gz
happening is because setuptools was treating my django apps (api, blog) as packages
I don't know exactly what it does then - if it passes them to pip, or dose something else, but they aren't setup to be packages, so it ends up doing the above.
I found this answer to a different question:
https://stackoverflow.com/a/26938095/17981284
that describes the situation for my project and applying the setting
skipsdist = True in my tox.ini resolves my issue
The problem is well described in the error log:
building 'psycopg2.\_psycopg' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC "-DPSYCOPG_VERSION=2.9.3 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=120009 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/home/dafrandle/PycharmProjects/djangoProject/.tox/py39/include -I/usr/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_asis.o -Wdeclaration-after-statement
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include \<Python.h\>
| ^\~\~\~\~\~\~\~\~\~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command '/usr/bin/x86_64-linux-gnu-gcc' 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 psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: pytz, mccabe, iniconfig, django-gravatar2, distlib, tomli, toml, sqlparse, soupsieve, six, pyparsing, pyflakes, pycodestyle, py, psycopg2, pluggy, platformdirs, filelock, attrs, asgiref, virtualenv, packaging, flake8, Django, beautifulsoup4, tox, pytest, djangorestframework, pytest-django
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for psycopg2 did not run successfully.
│ exit code: 1
╰─\> \[40 lines of output\]
So you fail to build the psycopg2 package, because...
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include \<Python.h\>
... pip tries to install the source package, which needs some compilation step for this the mentioned header file is missing.
When I try to reproduce the issue...
pip install psycopg2
Collecting psycopg2
Downloading psycopg2-2.9.3.tar.gz (380 kB)
...
You clearly see, that psycopg2 is downloaded as source and not as wheel.
So this is not a tox issue, but rather the project does not provide a pre-compiled wheel, and your environment is missing the necessary requirements.
There is the question left why this would work in your PyCharm environment. This is nothing I can say for sure, but one possible issue could be that your PyCharm is running in a different environment than tox - as you mentioned you are working in a VM environment. So this is something you need to figure out yourself.

Why am I getting an error while installing discord.py on mac

QUICK NOTE: This question is probably more related to macos or zsh than python.
I am trying to install discord.py on macos monterey, though I have the xcode command line tools, I am facing errors while installing discord.py. I am running Python 3.11.0a5.
The whole output:
Collecting discord.py
Using cached discord.py-1.7.3-py3-none-any.whl (786 kB)
Collecting aiohttp<3.8.0,>=3.6.0
Using cached aiohttp-3.7.4.post0-py3-none-any.whl
Collecting yarl<2.0,>=1.0
Using cached yarl-1.7.2.tar.gz (168 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting async-timeout<4.0,>=3.0
Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting chardet<5.0,>=2.0
Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting typing-extensions>=3.6.5
Using cached typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting multidict<7.0,>=4.5
Using cached multidict-6.0.2-cp311-cp311-macosx_10_9_universal2.whl
Collecting attrs>=17.3.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting idna>=2.0
Using cached idna-3.3-py3-none-any.whl (61 kB)
Building wheels for collected packages: yarl
Building wheel for yarl (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for yarl (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [43 lines of output]
**********************
* Accelerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-3.11
creating build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/_url.py -> build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/_quoting_py.py -> build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/__init__.py -> build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/_quoting.py -> build/lib.macosx-10.9-universal2-3.11/yarl
running egg_info
writing yarl.egg-info/PKG-INFO
writing dependency_links to yarl.egg-info/dependency_links.txt
writing requirements to yarl.egg-info/requires.txt
writing top-level names to yarl.egg-info/top_level.txt
reading manifest file 'yarl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl/*.html'
warning: no previously-included files found matching 'yarl/*.so'
warning: no previously-included files found matching 'yarl/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
writing manifest file 'yarl.egg-info/SOURCES.txt'
copying yarl/__init__.pyi -> build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/_quoting_c.c -> build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/_quoting_c.pyi -> build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/_quoting_c.pyx -> build/lib.macosx-10.9-universal2-3.11/yarl
copying yarl/py.typed -> build/lib.macosx-10.9-universal2-3.11/yarl
running build_ext
building 'yarl._quoting_c' extension
creating build/temp.macosx-10.9-universal2-3.11
creating build/temp.macosx-10.9-universal2-3.11/yarl
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c yarl/_quoting_c.c -o build/temp.macosx-10.9-universal2-3.11/yarl/_quoting_c.o
yarl/_quoting_c.c:198:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' 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 yarl
Failed to build yarl
ERROR: Could not build wheels for yarl, which is required to install pyproject.toml-based projects
https://docs.python.org/3.11/whatsnew/3.11.html#whatsnew311-c-api-porting
You're getting an error because you're using an alpha release of Python 3.11 and YARL hasn't been updated to support it yet.
The non-limited API files cellobject.h, classobject.h, code.h, context.h, funcobject.h, genobject.h and longintrepr.h have been moved to the Include/cpython directory. Moreover, the eval.h header file was removed. These files must not be included directly, as they are already included in Python.h: Include Files. If they have been included directly, consider including Python.h instead. (Contributed by Victor Stinner in bpo-35134.)
You should use a supported version of Python 3.10.
Try upgrading it:
pip install -U yarl

Building wheel for psycopg2 ... error pip3 install psycopg2?

When I'm running
pip3 install -r requirements.txt
then show me errors I show you bellow
I'm using
python version 3.8
PostgreSQL 13.0 (Ubuntu 13.0-1.pgdg20.04+1)
see my requirement.txt files here
certifi==2018.4.16
chardet==3.0.4
click==6.7
croniter==0.3.24
Django==2.0.5
django-rq==1.1.0
et-xmlfile==1.0.1
idna==2.7
jdcal==1.4
lxml==4.2.3
openpyxl==2.5.4
#pkg-resources==0.0.0
psycopg2==2.7.5
psycopg2-binary==2.8.5
python-dateutil==2.7.3
python-decouple==3.1
pytz==2018.5
redis==2.10.6
requests==2.19.1
rq==0.12.0
rq-scheduler==0.8.3
six==1.11.0
Unipath==1.1
urllib3==1.23
so show me this error in terminal I share with you complete command message that i typed already
pip3 install -r requirements.txt  ✔  2186  17:28:42
Requirement already satisfied: certifi==2018.4.16 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 1)) (2018.4.16)
Requirement already satisfied: chardet==3.0.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: click==6.7 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (6.7)
Requirement already satisfied: croniter==0.3.24 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 4)) (0.3.24)
Requirement already satisfied: Django==2.0.5 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 5)) (2.0.5)
Requirement already satisfied: django-rq==1.1.0 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 6)) (1.1.0)
Requirement already satisfied: et-xmlfile==1.0.1 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 7)) (1.0.1)
Requirement already satisfied: idna==2.7 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 8)) (2.7)
Requirement already satisfied: jdcal==1.4 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 9)) (1.4)
Requirement already satisfied: lxml==4.2.3 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 10)) (4.2.3)
Requirement already satisfied: openpyxl==2.5.4 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 11)) (2.5.4)
Collecting psycopg2==2.7.5
Using cached psycopg2-2.7.5.tar.gz (426 kB)
Collecting psycopg2-binary==2.8.5
Downloading psycopg2_binary-2.8.5-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
|████████████████████████████████| 3.0 MB 101 kB/s
Requirement already satisfied: python-dateutil==2.7.3 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 15)) (2.7.3)
Processing /code/data/.cache/pip/wheels/34/e3/10/a284f71c3b99a9ed3ab3d7d6f3af2dd72855bf04aa763dfef5/python_decouple-3.1-py3-none-any.whl
Requirement already satisfied: pytz==2018.5 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 17)) (2018.5)
Collecting redis==2.10.6
Using cached redis-2.10.6-py2.py3-none-any.whl (64 kB)
Collecting requests==2.19.1
Using cached requests-2.19.1-py2.py3-none-any.whl (91 kB)
Collecting rq==0.12.0
Using cached rq-0.12.0-py2.py3-none-any.whl (54 kB)
Collecting rq-scheduler==0.8.3
Using cached rq_scheduler-0.8.3-py2.py3-none-any.whl (14 kB)
Collecting six==1.11.0
Using cached six-1.11.0-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: Unipath==1.1 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 23)) (1.1)
Collecting urllib3==1.23
Using cached urllib3-1.23-py2.py3-none-any.whl (133 kB)
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_y3ne80g
cwd: /tmp/pip-install-wg77t_ou/psycopg2/
Complete output (72 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2
creating build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async_keyword.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_replication.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_sql.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130000 -DHAVE_LO64=1 -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
689 | while (interp->next)
| ^~
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2, psycopg2-binary, python-decouple, redis, urllib3, requests, rq, rq-scheduler, six
Attempting uninstall: psycopg2
Found existing installation: psycopg2 2.8.6
Uninstalling psycopg2-2.8.6:
Successfully uninstalled psycopg2-2.8.6
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8sijq8ua/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /code/data/.local/include/python3.8/psycopg2
cwd: /tmp/pip-install-wg77t_ou/psycopg2/
Complete output (72 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2
creating build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async_keyword.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_replication.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_sql.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130000 -DHAVE_LO64=1 -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
689 | while (interp->next)
| ^~
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of psycopg2
Moving to /code/data/.local/lib/python3.8/site-packages/psycopg2-2.8.6-py3.8.egg-info
from /code/data/.local/lib/python3.8/site-packages/~sycopg2-2.8.6-py3.8.egg-info
Moving to /code/data/.local/lib/python3.8/site-packages/psycopg2/
from /code/data/.local/lib/python3.8/site-packages/~sycopg2
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8sijq8ua/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /code/data/.local/include/python3.8/psycopg2 Check the logs for full command output.
from requirement.txt
#psycopg2==2.7.5
#psycopg2-binary==2.8.5
when I comment above then error is gone but absolutely database not work properly then.
but if I try python3 manage.py runserver
then show me also error
from lawyers.views import *
File "/code/data/abc/proj/lawyers/views.py", line 37, in <module>
from django_rq import job
File "/code/data/.local/lib/python3.8/site-packages/django_rq/__init__.py", line 3, in <module>
from .decorators import job
File "/code/data/.local/lib/python3.8/site-packages/django_rq/decorators.py", line 6, in <module>
from .queues import get_queue
SyntaxError: invalid syntax (queues.py, line 132)
I think error show me in django_rq
when type python3 manage.py runserver
tell me the possible solutions thank you I try many but unsuccessful
I solve my problem work for me
basically issue also with python
version I install python version 3.7 by using this command
sudo apt-get install python3.7
then activate environment
source env/bin/activate
Then I install my requirements.txt files by using this command
python3.7 -m pip install requirements.txt
my this error resolved not show me again
Building wheel for psycopg2 … error pip3 install psycopg2?
then show me
ModuleNotFoundError: No module named 'pandas'
then I install using this way
python3.7 -m pip install pandas
When I run python3.7 manage.py runserver
Then show me error is django-rq
/code/data/.local/lib/python3.7/site-packages/django_rq/queues.py", line 132
def get_queue(name='default', default_timeout=None, async=None,
^
I this so async is reserved word now in python then in my package I replace the name of async to is_async in whole django-rq/queues.py
when I run project again then show me this error
import xlsxwriter
ModuleNotFoundError: No module named 'xlsxwriter'
Then I fix by this way
python3.7 -m pip install xlsxwriter
Then show me one more error
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4'
Then I fixed using this way
python3.7 -m pip install bs4
Then my project work fine.
I hope my solution is helpful for anyone.
I have require temporarily python3.7 version so I'm not wanted to change their path to python3 .

Categories