Error failed building wheel for pytelegrambotapi

Всем привет, пытаюсь добавить библиотеку в питон, но что бы не пытался ничего не выходит, поискав в интернете найти решений не смог

Как правильно задавать вопросы

Правильно сформулированный вопрос и его грамотное оформление способствует высокой вероятности получения достаточно содержательного и по существу ответа. Общая рекомендация по составлению тем: 1. Для начала воспользуйтесь поиском форума. 2. Укажите версию ОС вместе с разрядностью. Пример: LM 19.3 x64, LM Sarah x32 3. DE. Если вопрос касается двух, то через запятую. (xfce, KDE, cinnamon, mate) 4. Какое железо. (достаточно вывод inxi -Fxz в спойлере (как пользоваться спойлером смотрим здесь)) или же дать ссылку на hw-probe 5. Суть. Желательно с выводом консоли, логами. 6. Скрин. Просьба указывать 2, 3 и 4 независимо от того, имеет ли это отношение к вопросу или нет. Так же не забываем об общих правилах Как пример вот

no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

17 фев 2018, 20:21

Всем привет, пытаюсь добавить библиотеку в питон, но что бы не пытался ничего не выходит, поискав в интернете найти решений не смог

Вложения
Снимок экрана от 2018-02-17 20-19-48.png


Аватара пользователя

symon2014

Сообщения: 5136
Зарегистрирован: 16 дек 2017, 21:59
Решено: 29
Откуда: Феодосия
Благодарил (а): 31 раз
Поблагодарили: 646 раз
Контактная информация:

pip install pyTelegramBotAPI

#2

17 фев 2018, 20:38

pip3


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#3

17 фев 2018, 20:41

etamax, тоже самое, пробовал(

Вложения
Снимок экрана от 2018-02-17 20-41-18.png


Аватара пользователя

symon2014

Сообщения: 5136
Зарегистрирован: 16 дек 2017, 21:59
Решено: 29
Откуда: Феодосия
Благодарил (а): 31 раз
Поблагодарили: 646 раз
Контактная информация:

pip install pyTelegramBotAPI

#4

17 фев 2018, 20:56

apt install python-pip
apt install python-setuptools
sudo pip install pyTelegramBotAPI

The directory ‘/home/msuser/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/msuser/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting pyTelegramBotAPI
Downloading pyTelegramBotAPI-3.5.2.tar.gz (51kB)
100% |████████████████████████████████| 61kB 323kB/s
Collecting requests (from pyTelegramBotAPI)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 469kB/s
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from pyTelegramBotAPI)
Collecting certifi>=2017.4.17 (from requests->pyTelegramBotAPI)
Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB)
100% |████████████████████████████████| 153kB 383kB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests->pyTelegramBotAPI)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 357kB/s
Collecting idna<2.7,>=2.5 (from requests->pyTelegramBotAPI)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 285kB/s
Collecting urllib3<1.23,>=1.21.1 (from requests->pyTelegramBotAPI)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |████████████████████████████████| 133kB 221kB/s
Installing collected packages: certifi, chardet, idna, urllib3, requests, pyTelegramBotAPI
Found existing installation: chardet 2.3.0
Uninstalling chardet-2.3.0:
Successfully uninstalled chardet-2.3.0
Found existing installation: idna 2.0
Uninstalling idna-2.0:
Successfully uninstalled idna-2.0
Running setup.py install for pyTelegramBotAPI … done
Successfully installed certifi-2018.1.18 chardet-3.0.4 idna-2

https://kostya.co/create-first-telegram-bot/


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#5

17 фев 2018, 21:04

etamax, опять, 2 пункт установил, а вот с 3 те же самые проблемы, и с ресурса того же делал по инструкции

Вложения
Снимок экрана от 2018-02-17 21-06-45.png


Аватара пользователя

symon2014

Сообщения: 5136
Зарегистрирован: 16 дек 2017, 21:59
Решено: 29
Откуда: Феодосия
Благодарил (а): 31 раз
Поблагодарили: 646 раз
Контактная информация:

pip install pyTelegramBotAPI

#6

17 фев 2018, 21:09

pip -V
pip 9.0.1 from /home/msuser/.local/lib/python2.7/site-packages (python 2.7)

для этого
pip install --upgrade pip


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#7

17 фев 2018, 21:31

etamax,

Вложения
Снимок экрана от 2018-02-17 21-30-53.png


Аватара пользователя

rogoznik

Сообщения: 9443
Зарегистрирован: 27 июн 2017, 13:36
Решено: 119
Откуда: Нижний Тагил
Благодарил (а): 715 раз
Поблагодарили: 1815 раз
Контактная информация:

Birthday

pip install pyTelegramBotAPI

#8

17 фев 2018, 21:34

Так он же тебе написал
«Может быть вы имели ввиду install»
А у тебя написано intsall. Чувствуешь разницу.

Изображение

Изображение


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#9

17 фев 2018, 21:36

darkfenix, букву пропустил, ниже на скрине правильно написал же


Аватара пользователя

rogoznik

Сообщения: 9443
Зарегистрирован: 27 июн 2017, 13:36
Решено: 119
Откуда: Нижний Тагил
Благодарил (а): 715 раз
Поблагодарили: 1815 раз
Контактная информация:

Birthday

pip install pyTelegramBotAPI

#10

17 фев 2018, 21:40

GasMan, не увидел.
Только что

Код: Выделить всё

darkfenix@darkfenix  ~  pip install --upgrade pip
Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 837kB/s 
Installing collected packages: pip
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
 darkfenix@darkfenix  ~  inxi -S           
System:    Host: darkfenix Kernel: 4.14.17-041417-generic x86_64 (64 bit) Desktop: Cinnamon 3.6.7
           Distro: Linux Mint 18.3 Sylvia

Покажи вывод inxi -S

Изображение

Изображение


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#11

17 фев 2018, 21:46

darkfenix, inxi -S
System: Host: Brokoly Kernel: 4.10.0-42-generic x86_64 (64 bit)
Desktop: Cinnamon 3.4.6 Distro: Linux Mint 18.2 Sonya


Аватара пользователя

rogoznik

Сообщения: 9443
Зарегистрирован: 27 июн 2017, 13:36
Решено: 119
Откуда: Нижний Тагил
Благодарил (а): 715 раз
Поблагодарили: 1815 раз
Контактная информация:

Birthday

pip install pyTelegramBotAPI

#12

17 фев 2018, 21:58

Вот сейчас в лайв-сессии

18-02-17-235731.png

Что-то ты где-то сломал.

Изображение

Изображение


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#13

17 фев 2018, 22:00

Есть какие-то предположения?)) Ядро не так давно откатывал, звук не работал, сейчас висит обновление ядра 4.13.0


Аватара пользователя

rogoznik

Сообщения: 9443
Зарегистрирован: 27 июн 2017, 13:36
Решено: 119
Откуда: Нижний Тагил
Благодарил (а): 715 раз
Поблагодарили: 1815 раз
Контактная информация:

Birthday

pip install pyTelegramBotAPI

#14

17 фев 2018, 22:04

Тут не в ядре дело. В питоне не силен. Подождем мож подскажет кто куда копать.

Изображение

Изображение


Аватара пользователя

symon2014

Сообщения: 5136
Зарегистрирован: 16 дек 2017, 21:59
Решено: 29
Откуда: Феодосия
Благодарил (а): 31 раз
Поблагодарили: 646 раз
Контактная информация:

pip install pyTelegramBotAPI

#15

17 фев 2018, 22:08

darkfenix писал(а): ↑

17 фев 2018, 21:58

Что-то ты где-то сломал.

Не корректный пример , пакет не поставился , не хватает —
apt install python-setuptools

4.4.0-112-generic ))


Аватара пользователя

rogoznik

Сообщения: 9443
Зарегистрирован: 27 июн 2017, 13:36
Решено: 119
Откуда: Нижний Тагил
Благодарил (а): 715 раз
Поблагодарили: 1815 раз
Контактная информация:

Birthday

pip install pyTelegramBotAPI

#16

17 фев 2018, 22:11

etamax писал(а): ↑

17 фев 2018, 22:08

Не корректный пример

Что в нем не так. pip то обновился. А целью поставить туда pyTelegramBotApi я не задавался. Я всего лишь показал что pip обновляется и пытается установить пакет на версии 18.2.

Изображение

Изображение


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#17

18 фев 2018, 02:31

etamax, а что-нибудь решить то удастся?)


Аватара пользователя

Chocobo

Сообщения: 9954
Зарегистрирован: 27 авг 2016, 22:57
Решено: 214
Откуда: НН
Благодарил (а): 795 раз
Поблагодарили: 2980 раз
Контактная информация:

pip install pyTelegramBotAPI

#18

18 фев 2018, 02:53

GasMan, да можно все руками развернуть.
setuptools:

Код: Выделить всё

wget https://pypi.python.org/packages/6c/54/f7e9cea6897636a04e74c3954f0d8335cc38f7d01e27eec98026b049a300/setuptools-38.5.1.zip
unzip setuptools-38.5.1.zip
cd setuptools-38.5.1
sudo python setup.py install

pip:

Код: Выделить всё

wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz
tar -xzvf pip-9.0.1.tar.gz
cd pip-9.0.1
sudo python setup.py install

Код: Выделить всё

▶ pip -V                 
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg (python 2.7)

Ну и следуя этой логике — с тем же успехом можно скачать и сам искомый модуль pyTelegramBotAPI и развернуть вручную без pip :)

Изображение

   

Изображение


no avatar

GasMan

Сообщения: 27
Зарегистрирован: 12 окт 2017, 21:56
Благодарил (а): 1 раз
Контактная информация:

pip install pyTelegramBotAPI

#19

18 фев 2018, 03:08

Код: Выделить всё

~/Документы/pyTelegramBotAPI $ sudo python setup.py install
[sudo] пароль для selderey: 
running install
running bdist_egg
running egg_info
writing requirements to pyTelegramBotAPI.egg-info/requires.txt
writing pyTelegramBotAPI.egg-info/PKG-INFO
writing top-level names to pyTelegramBotAPI.egg-info/top_level.txt
writing dependency_links to pyTelegramBotAPI.egg-info/dependency_links.txt
reading manifest file 'pyTelegramBotAPI.egg-info/SOURCES.txt'
writing manifest file 'pyTelegramBotAPI.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/telebot
copying telebot/apihelper.py -> build/lib.linux-x86_64-2.7/telebot
copying telebot/__init__.py -> build/lib.linux-x86_64-2.7/telebot
copying telebot/util.py -> build/lib.linux-x86_64-2.7/telebot
copying telebot/types.py -> build/lib.linux-x86_64-2.7/telebot
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/telebot
copying build/lib.linux-x86_64-2.7/telebot/apihelper.py -> build/bdist.linux-x86_64/egg/telebot
copying build/lib.linux-x86_64-2.7/telebot/__init__.py -> build/bdist.linux-x86_64/egg/telebot
copying build/lib.linux-x86_64-2.7/telebot/util.py -> build/bdist.linux-x86_64/egg/telebot
copying build/lib.linux-x86_64-2.7/telebot/types.py -> build/bdist.linux-x86_64/egg/telebot
byte-compiling build/bdist.linux-x86_64/egg/telebot/apihelper.py to apihelper.pyc
byte-compiling build/bdist.linux-x86_64/egg/telebot/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/telebot/util.py to util.pyc
byte-compiling build/bdist.linux-x86_64/egg/telebot/types.py to types.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying pyTelegramBotAPI.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyTelegramBotAPI.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyTelegramBotAPI.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyTelegramBotAPI.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pyTelegramBotAPI.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/pyTelegramBotAPI-3.5.2-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pyTelegramBotAPI-3.5.2-py2.7.egg
Copying pyTelegramBotAPI-3.5.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding pyTelegramBotAPI 3.5.2 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/pyTelegramBotAPI-3.5.2-py2.7.egg
Processing dependencies for pyTelegramBotAPI==3.5.2
Searching for requests
Reading https://pypi.python.org/simple/requests/
Download error on https://pypi.python.org/simple/requests/: unknown error (_ssl.c:2831) -- Some packages may not be found!
Couldn't find index page for 'requests' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: unknown error (_ssl.c:2831) -- Some packages may not be found!
No local packages or working download links found for requests
error: Could not find suitable distribution for Requirement.parse('requests')

все шло хорошо, пока не начал сам следовать логике :-D вот что вышло когда попытался присоединить модуль без pip

Последний раз редактировалось пользователем 1 rogoznik; всего редактировалось раз: 18

Причина: BBcode


Вернуться в «Программирование, скриптинг, виртуализация»


Перейти

  • Новости
  • ↳   Новости Linux Mint
  • ↳   Другие новости
  • Документация, FaQ и Видеоматериалы
  • ↳   Руководства
  • ↳   Руководство пользователя LM 18 Cinnamon
  • ↳   Видеоматериалы
  • ↳   Вопрос новичка и FaQ
  • Установка, настройка, оптимизация
  • ↳   Установка Linux Mint
  • ↳   Загрузка системы, бэкапы и восстановление
  • ↳   Параметры и оптимизация
  • ↳   Иные системные ошибки
  • ↳   Неофициальные сборки
  • ↳   Общие вопросы по системе
  • Дистрибутивы
  • ↳   Linux Mint
  • ↳   Cinnamon
  • ↳   Mate
  • ↳   Xfce
  • ↳   KDE
  • ↳   Другие среды рабочего стола
  • ↳   LMDE
  • Программное обеспечение
  • ↳   Мультимедиа
  • ↳   Офис и документы
  • ↳   Системные утилиты
  • ↳   Консольные плюшки
  • ↳   Программирование, скриптинг, виртуализация
  • ↳   Работа с сетью
  • ↳   Безопасность
  • ↳   Wine
  • ↳   Игры
  • ↳   Иное программное обеспечение
  • Поддержка железа
  • ↳   Видеокарты
  • ↳   Звуковые карты
  • ↳   Принтеры, Сканеры, МФУ
  • ↳   Жесткие диски, SSD, Flash-накопители, разделы на них
  • ↳   Сетевые карты, модемы, Wi-Fi, bluetooth
  • ↳   Прочие устройства
  • Другие дистрибутивы
  • ↳   Deb-based [Debian / Neon / Ubuntu]
  • ↳   Arch-based [Arch / Manjaro / Antegros]
  • ↳   Rpm-based [Suse / Fedora / CentOS]
  • ↳   Прочие [Gentoo/Slackware/*BSD]
  • Разное
  • ↳   Болталка: Оффтоп, разбор полетов
  • ↳   Песочница
  • ↳   Корзина

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 1 гость

Telegram API

30.04.2020, 14:58. Показов 8362. Ответов 8


Можете сказать иил подсказать в чем ошибка, а то я уже 40 минут не могу решить эту проблему
устанавливаю pytelegrambotapi:

pip install pytelegrambotapi
Requirement already satisfied: pytelegrambotapi in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (3.7.0)
Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pytelegrambotapi) (2.23.0)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pytelegrambotapi) (1.14.0)
Requirement already satisfied: idna<3,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->pytelegrambotapi) (2.9)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->pytelegrambotapi) (1.25.9)
Requirement already satisfied: chardet<4,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->pytelegrambotapi) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->pytelegrambotapi) (2020.4.5.1)
Could not build wheels for pytelegrambotapi, since package ‘wheel’ is not installed.
Could not build wheels for requests, since package ‘wheel’ is not installed.
Could not build wheels for six, since package ‘wheel’ is not installed.
Could not build wheels for idna, since package ‘wheel’ is not installed.
Could not build wheels for urllib3, since package ‘wheel’ is not installed.
Could not build wheels for chardet, since package ‘wheel’ is not installed.
Could not build wheels for certifi, since package ‘wheel’ is not installed.

То выдает ошибку
А когда пытаюсь запустить свой код:

Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import telebot
 
bot = telebot.TeleBot('1041078562:AAFTFk9YxGiJjcyH4XsghfN72U328gG5cTc')
 
 
@bot.message_handler(content_types=['text'])
def send_text(message):
    if message.text == 'Привет':
        bot.send_message(message.chat.id, 'Привет, мой создатель')
    elif message.text == 'Пока':
        bot.send_message(message.chat.id, 'Прощай, создатель')
 
 
# RUN
bot.polling()

то получается множество ошибок((
Буду очень признателен если вы мне поможете.

Добавлено через 27 минут
Вот ошибки кстати:

2020-04-30 16:56:46,685 (util.py:66 PollingThread) ERROR — TeleBot: «ConnectionError occurred, args=(ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’)),)
Traceback (most recent call last):
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 670, in urlopen
httplib_response = self._make_request(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 381, in _make_request
self._validate_conn(conn)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 976, in _validate_conn
conn.connect()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connection.py», line 361, in connect
self.sock = ssl_wrap_socket(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/ssl_.py», line 377, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 500, in wrap_socket
return self.sslsocket_class._create(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1040, in _create
self.do_handshake()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/adapters.py», line 439, in send
resp = conn.urlopen(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 724, in urlopen
retries = retries.increment(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/retry.py», line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/packages/six.py», line 734, in reraise
raise value.with_traceback(tb)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 670, in urlopen
httplib_response = self._make_request(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 381, in _make_request
self._validate_conn(conn)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 976, in _validate_conn
conn.connect()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connection.py», line 361, in connect
self.sock = ssl_wrap_socket(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/ssl_.py», line 377, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 500, in wrap_socket
return self.sslsocket_class._create(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1040, in _create
self.do_handshake()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1309, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: (‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/util.py», line 60, in run
task(*args, **kwargs)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/__init__.py», line 281, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/__init__.py», line 251, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/apihelper.py», line 199, in get_updates
return _make_request(token, method_url, params=payload)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/apihelper.py», line 62, in _make_request
result = _get_req_session().request(method, request_url, params=params, files=files,
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py», line 530, in request
resp = self.send(prep, **send_kwargs)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py», line 643, in send
r = adapter.send(request, **kwargs)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/adapters.py», line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))
«
Traceback (most recent call last):
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 670, in urlopen
httplib_response = self._make_request(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 381, in _make_request
self._validate_conn(conn)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 976, in _validate_conn
conn.connect()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connection.py», line 361, in connect
self.sock = ssl_wrap_socket(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/ssl_.py», line 377, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 500, in wrap_socket
return self.sslsocket_class._create(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1040, in _create
self.do_handshake()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/adapters.py», line 439, in send
resp = conn.urlopen(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 724, in urlopen
retries = retries.increment(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/retry.py», line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/packages/six.py», line 734, in reraise
raise value.with_traceback(tb)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 670, in urlopen
httplib_response = self._make_request(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 381, in _make_request
self._validate_conn(conn)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py», line 976, in _validate_conn
conn.connect()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connection.py», line 361, in connect
self.sock = ssl_wrap_socket(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/ssl_.py», line 377, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 500, in wrap_socket
return self.sslsocket_class._create(
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1040, in _create
self.do_handshake()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py», line 1309, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: (‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «/Users/Askar/PycharmProjects/yt2.py», line 15, in <module>
bot.polling()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/__init__.py», line 415, in polling
self.__threaded_polling(none_stop, interval, timeout)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/__init__.py», line 438, in __threaded_polling
polling_thread.raise_exceptions()
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/util.py», line 79, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/six.py», line 703, in reraise
raise value
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/util.py», line 60, in run
task(*args, **kwargs)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/__init__.py», line 281, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/__init__.py», line 251, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/apihelper.py», line 199, in get_updates
return _make_request(token, method_url, params=payload)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/telebot/apihelper.py», line 62, in _make_request
result = _get_req_session().request(method, request_url, params=params, files=files,
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py», line 530, in request
resp = self.send(prep, **send_kwargs)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py», line 643, in send
r = adapter.send(request, **kwargs)
File «/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/adapters.py», line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Sorry this took forever, a hard week. Here is the full transcript on a new install of Ubuntu 20.04:

First the error, then me installing the error generating packages without issue. After installing those packages, Lektor install works without issue.

aperez@aperez-V:~$ curl -sf https://www.getlektor.com/installer.py | sudo python3

Welcome to Lektor
This script will install Lektor on your computer.

Installing at:
  bin: /usr/local/bin
  app: /usr/local/lib/lektor

An existing installation was detected. This will be removed!

Continue? [Yn] y

Installing virtual environment...
Collecting Lektor
  Downloading Lektor-3.1.3-py2.py3-none-any.whl (1.8 MB)
     |████████████████████████████████| 1.8 MB 1.3 MB/s 
Collecting inifile
  Downloading inifile-0.4.zip (7.4 kB)
Requirement already satisfied, skipping upgrade: setuptools in /usr/local/lib/lektor/lib/python3.8/site-packages (from Lektor) (44.0.0)
Collecting EXIFRead
  Downloading ExifRead-2.1.2.tar.gz (33 kB)
Collecting Jinja2>=2.4
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
     |████████████████████████████████| 125 kB 16.3 MB/s 
Collecting Babel
  Downloading Babel-2.8.0-py2.py3-none-any.whl (8.6 MB)
     |████████████████████████████████| 8.6 MB 9.6 MB/s 
Collecting Flask
  Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
     |████████████████████████████████| 94 kB 525 kB/s 
Requirement already satisfied, skipping upgrade: pip in /usr/local/lib/lektor/lib/python3.8/site-packages (from Lektor) (20.0.2)
Collecting watchdog
  Downloading watchdog-0.10.2.tar.gz (95 kB)
     |████████████████████████████████| 95 kB 772 kB/s 
Collecting click>=6.0
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
     |████████████████████████████████| 82 kB 163 kB/s 
Collecting requests[security]
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 933 kB/s 
Collecting mistune>=0.7.0
  Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl (32 kB)
Collecting pytz>=2015.7
  Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
     |████████████████████████████████| 510 kB 12.5 MB/s 
Collecting itsdangerous>=0.24
  Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Werkzeug>=0.15
  Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
     |████████████████████████████████| 298 kB 12.9 MB/s 
Collecting pathtools>=0.1.1
  Downloading pathtools-0.1.2.tar.gz (11 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Downloading urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
     |████████████████████████████████| 126 kB 11.3 MB/s 
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
     |████████████████████████████████| 133 kB 15.6 MB/s 
Collecting idna<3,>=2.5
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 881 kB/s 
Collecting certifi>=2017.4.17
  Downloading certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
     |████████████████████████████████| 157 kB 11.9 MB/s 
Collecting pyOpenSSL>=0.14; extra == "security"
  Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 356 kB/s 
Collecting cryptography>=1.3.4; extra == "security"
  Downloading cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB)
     |████████████████████████████████| 2.7 MB 12.1 MB/s 
Collecting six>=1.5.2
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting cffi!=1.11.3,>=1.8
  Downloading cffi-1.14.0-cp38-cp38-manylinux1_x86_64.whl (409 kB)
     |████████████████████████████████| 409 kB 11.6 MB/s 
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 17.2 MB/s 
Building wheels for collected packages: inifile, EXIFRead, watchdog, pathtools
  Building wheel for inifile (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ezhn8uhu/inifile/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ezhn8uhu/inifile/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ma23lgdd
       cwd: /tmp/pip-install-ezhn8uhu/inifile/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for inifile
  Running setup.py clean for inifile
  Building wheel for EXIFRead (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ezhn8uhu/EXIFRead/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ezhn8uhu/EXIFRead/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_qfarw3o
       cwd: /tmp/pip-install-ezhn8uhu/EXIFRead/
  Complete output (7 lines):
  Warning: 'classifiers' should be a list, got type 'tuple'
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for EXIFRead
  Running setup.py clean for EXIFRead
  Building wheel for watchdog (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ezhn8uhu/watchdog/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ezhn8uhu/watchdog/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-0ztm0kd5
       cwd: /tmp/pip-install-ezhn8uhu/watchdog/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for watchdog
  Running setup.py clean for watchdog
  Building wheel for pathtools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ezhn8uhu/pathtools/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ezhn8uhu/pathtools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-va118rhf
       cwd: /tmp/pip-install-ezhn8uhu/pathtools/
  Complete output (8 lines):
  /tmp/pip-install-ezhn8uhu/pathtools/setup.py:25: DeprecationWarning: the imp module is deprecated in favour of importlib; see the modules documentation for alternative uses
    import imp
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for pathtools
  Running setup.py clean for pathtools
Failed to build inifile EXIFRead watchdog pathtools
Installing collected packages: inifile, EXIFRead, MarkupSafe, Jinja2, pytz, Babel, click, itsdangerous, Werkzeug, Flask, pathtools, watchdog, urllib3, chardet, idna, certifi, pycparser, cffi, six, cryptography, pyOpenSSL, requests, mistune, Lektor
    Running setup.py install for inifile ... done
    Running setup.py install for EXIFRead ... done
    Running setup.py install for pathtools ... done
    Running setup.py install for watchdog ... done
Successfully installed Babel-2.8.0 EXIFRead-2.1.2 Flask-1.1.2 Jinja2-2.11.2 Lektor-3.1.3 MarkupSafe-1.1.1 Werkzeug-1.0.1 certifi-2020.4.5.1 cffi-1.14.0 chardet-3.0.4 click-7.1.2 cryptography-2.9.2 idna-2.9 inifile-0.4 itsdangerous-1.1.0 mistune-0.8.4 pathtools-0.1.2 pyOpenSSL-19.1.0 pycparser-2.20 pytz-2020.1 requests-2.23.0 six-1.15.0 urllib3-1.25.9 watchdog-0.10.2

All done!

aperez@aperez-V:~$ sudo pip3 install inifile
Collecting inifile
  Using cached inifile-0.4.zip (7.4 kB)
Building wheels for collected packages: inifile
  Building wheel for inifile (setup.py) ... done
  Created wheel for inifile: filename=inifile-0.4-py3-none-any.whl size=6809 sha256=157fc596fe32ddc20ab64041198dd3185f7047ec902245ae7319b0a1a22c6a6f
  Stored in directory: /root/.cache/pip/wheels/df/9c/4f/a21e9e01f6d37f98e61fe3e13f9a4a5274a9162b6d521b9cd5
Successfully built inifile
Installing collected packages: inifile
Successfully installed inifile-0.4
aperez@aperez-V:~$ sudo pip3 install EXIFRead
Collecting EXIFRead
  Using cached ExifRead-2.1.2.tar.gz (33 kB)
Building wheels for collected packages: EXIFRead
  Building wheel for EXIFRead (setup.py) ... done
  Created wheel for EXIFRead: filename=ExifRead-2.1.2-py3-none-any.whl size=34200 sha256=56cb165cc419eddf742da9c43d00ccc63f587b651fa4eb8e5f8f0f787291b37a
  Stored in directory: /root/.cache/pip/wheels/34/c4/f1/0c1e430b02eb990a0e0773b3791ba601fece63cebb836ba780
Successfully built EXIFRead
Installing collected packages: EXIFRead
Successfully installed EXIFRead-2.1.2
aperez@aperez-V:~$ sudo pip3 install watchdog
Collecting watchdog
  Using cached watchdog-0.10.2.tar.gz (95 kB)
Collecting pathtools>=0.1.1
  Using cached pathtools-0.1.2.tar.gz (11 kB)
Building wheels for collected packages: watchdog, pathtools
  Building wheel for watchdog (setup.py) ... done
  Created wheel for watchdog: filename=watchdog-0.10.2-py3-none-any.whl size=73602 sha256=d8582b445d4ad6b86be44da2099ca4403998a51b062c4c2c2e1a396fb5cb3320
  Stored in directory: /root/.cache/pip/wheels/4e/14/01/1676612f5b23c641868de61d36ac2d5be12f4eec6c087fbd62
  Building wheel for pathtools (setup.py) ... done
  Created wheel for pathtools: filename=pathtools-0.1.2-py3-none-any.whl size=8784 sha256=87fe2590c4c46809b4eb438932d352dd6c898d57d7f4c19e7e7a7e09584bcfd7
  Stored in directory: /root/.cache/pip/wheels/4c/8e/7e/72fbc243e1aeecae64a96875432e70d4e92f3d2d18123be004
Successfully built watchdog pathtools
Installing collected packages: pathtools, watchdog
Successfully installed pathtools-0.1.2 watchdog-0.10.2

Any comments?

Numpy is the best python package for array creation and computing complex mathematic calculations. Generally, you are able to install NumPy easily using the pip command. But sometimes you are unable to install it and get the error message  failed building wheel for numpy. In this entire tutorial, you will know why this error comes and how to solve the error: failed building wheel for NumPy error.

What is a Wheel?

The wheel is a distribution or packaging format. Today most coders use it for building and packaging the python code. There is a file of the format WHL that saves the packaging information in wheel format. The Wheel contains all the metadata and files for the python to install the package.

Most of the time this type of error comes when there is a NumPy version released. The current NumPy releases do not support the specific python version. So the wheel format file is unable to install the version of the Numpy in your system. And it causes the failed building wheel for numpy error.

Solution for the failed building wheel for NumPy

The solution for the error failed building wheel for NumPy is very simple. I will discuss different ways to solve this type of error.

Solution 1: Upgrade the pip

The first solution to remove this error is to first upgrade the pip command. After upgrading try to install the NumPy version using the pip command.

But make sure to check the version of the python. If the version is 3. xx then use the pip3 command and if it is 2. xx then use the pip command.

Use the below command to check the version of python.

python --version

Checking Python version before installing spacy

Checking the Python version before installing spacy

Use the below command to install the NumPy.

For python3.xx

pip3 install numpy

For python 2. xx

pip install numpy

My system has python 3. xx so I will use the pip3 command.

Install numpy using the pip3 command

Install numpy using the pip3 command

Solution 2: Install the specific NumPy version

If you are still getting the error after applying solution 1 then you have to check which version of the Numpy is supported by the python. In this case, you have to downgrade the NumPy version.

For example, let’s say the current Numpy version is 1.19 and it is not supported by python. Then you have to check the version of the NumPy supported by the python. Let’s say it is 1.18 then you will install it using the below command.

pip3 install numpy==1.18

Install the specific version of numpy

Install the specific version of numpy

It will successfully install the NumPy and you will not get the failed building wheel for NumPy.

Conclusion

Numpy is a great package if you want to do computational work on datasets. These are the ways that can solve the error.

I hope you have liked this tutorial. If you are still getting errors then you can contact us for more help.

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

We respect your privacy and take protecting it seriously

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

The Solution to What is the meaning of «Failed building wheel for X» in pip install? is

(pip maintainer here!)

If the package is not a wheel, pip tries to build a wheel for it (via setup.py bdist_wheel). If that fails for any reason, you get the «Failed building wheel for pycparser» message and pip falls back to installing directly (via setup.py install).

Once we have a wheel, pip can install the wheel by unpacking it correctly. pip tries to install packages via wheels as often as it can. This is because of various advantages of using wheels (like faster installs, cache-able, not executing code again etc).


Your error message here is due to the wheel package being missing, which contains the logic required to build the wheels in setup.py bdist_wheel. (pip install wheel can fix that.)


The above is the legacy behavior that is currently the default; we’ll switch to PEP 517 by default, sometime in the future, moving us to a standards-based process for this. We also have isolated builds for that so, you’d have wheel installed in those environments by default. :)

  • PEP 517: A build-system independent format for source trees
  • A blog post on «PEP 517 and 518 in Plain English»

~ Answered on 2019-06-08 07:04:32

Здравствуйте! Я пытался установить библиотеку discord.py в pycharm,но когда я пишу pip install discord.py,то выдаёт большую ошибку:

ERROR: Failed building wheel for yarl
Building wheel for multidict (PEP 517) … error
ERROR: Command errored out with exit status 1:
command: ‘C:UsersДимаAppDataLocalProgramsPythonPython39python.exe’ ‘C:UsersДимаAppDataLocalProgramsPythonPython39libsite-packagespip_vendor
pep517_in_process.py’ build_wheel ‘C:Users1F43~1AppDataLocalTemptmpwbg_tzt2’
cwd: C:UsersДимаAppDataLocalTemppip-install-7fcco2mqmultidict
Complete output (42 lines):
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) ‘utf-8’ codec can’t decode byte 0xe4 in position 0: invalid continuation byte (sitecustomize.py, line 7)
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win-amd64-3.9
creating buildlib.win-amd64-3.9multidict
copying multidict_abc.py -> buildlib.win-amd64-3.9multidict
copying multidict_compat.py -> buildlib.win-amd64-3.9multidict
copying multidict_multidict_base.py -> buildlib.win-amd64-3.9multidict
copying multidict_multidict_py.py -> buildlib.win-amd64-3.9multidict
copying multidict__init__.py -> buildlib.win-amd64-3.9multidict
running egg_info
writing multidict.egg-infoPKG-INFO
writing dependency_links to multidict.egg-infodependency_links.txt
writing top-level names to multidict.egg-infotop_level.txt
reading manifest file ‘multidict.egg-infoSOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no previously-included files matching ‘*.pyc’ found anywhere in distribution
warning: no previously-included files found matching ‘multidict_multidict.html’
warning: no previously-included files found matching ‘multidict*.so’
warning: no previously-included files found matching ‘multidict*.pyd’
warning: no previously-included files found matching ‘multidict*.pyd’
no previously-included directories found matching ‘docs_build’
writing manifest file ‘multidict.egg-infoSOURCES.txt’
copying multidict__init__.pyi -> buildlib.win-amd64-3.9multidict
copying multidict_multidict.c -> buildlib.win-amd64-3.9multidict
copying multidictpy.typed -> buildlib.win-amd64-3.9multidict
creating buildlib.win-amd64-3.9multidict_multilib
copying multidict_multilibdefs.h -> buildlib.win-amd64-3.9multidict_multilib
copying multidict_multilibdict.h -> buildlib.win-amd64-3.9multidict_multilib
copying multidict_multilibistr.h -> buildlib.win-amd64-3.9multidict_multilib
copying multidict_multilibiter.h -> buildlib.win-amd64-3.9multidict_multilib
copying multidict_multilibpair_list.h -> buildlib.win-amd64-3.9multidict_multilib
copying multidict_multilibviews.h -> buildlib.win-amd64-3.9multidict_multilib
running build_ext
building ‘multidict._multidict’ extension
error: Microsoft Visual C++ 14.0 is required. Get it with «Build Tools for Visual Studio»: https://visualstudio.microsoft.com/downloads/
—————————————-
ERROR: Failed building wheel for multidict
Failed to build yarl multidict
ERROR: Could not build wheels for yarl, multidict which use PEP 517 and cannot be installed directly

Всё выше пишется красным.
Спасибо заранее за ответ.


  • Вопрос задан

    более двух лет назад

  • 1064 просмотра

error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

https://github.com/Rapptz/discord.py/discussions/5898

Вы используете Python 3.9 под который пакет multidict не имеет предварительно скомпилированных «wheels».

Три варианта исправления:

  • Просто ждать пока скомпилированная версия библиотеки появится
  • Установить Microsoft Visual C++ 14.0, как предлагает pip и скомпилировать необходимые библиотеки при установке
  • Самый простой: Откатиться на py3.8

Пригласить эксперта


  • Показать ещё
    Загружается…

09 февр. 2023, в 16:32

3500 руб./за проект

09 февр. 2023, в 15:56

20000 руб./за проект

09 февр. 2023, в 15:55

75000 руб./за проект

Минуточку внимания

Today I was trying to install frappe-bench package within a newly created python 3 virtual environment in my Ubuntu 20.04. It gave this error in terminal.

ERROR: Command errored out with exit status 1:
command: /home/junaid/python-env/erpnext/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g6347jx5/python-crontab/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g6347jx5/python-crontab/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-kw47_972
    cwd: /tmp/pip-install-g6347jx5/python-crontab/
Complete output (8 lines):
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'release'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: setup.py --help [cmd1 cmd2 ...]
    or: setup.py --help-commands
    or: setup.py cmd --help

error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for python-crontab

However, the package appeared to be installed even with above error. Then I got this SO thread in my search https://stackoverflow.com/questions/53204916/what-is-the-meaning-of-failed-building-wheel-for-x-in-pip-install. It has this answer from a pip maintainer briefing about the behavior of pip, so pip was trying to build the wheel before attempting by setup.py install.

Same thread has another answer suggesting to install the wheel package.

pip3 install wheel

I tried it. Then installing python-crontab worked without any errors!

Понравилась статья? Поделить с друзьями:
  • Error failed building wheel for pycuda
  • Error explicit specialization in non namespace scope
  • Error failed building wheel for pycrypto
  • Error expired multiplayer object has been used
  • Error failed building wheel for pycairo