Найти - Пользователи
Полная версия: Запуск библиотеки PyBrain в Ubuntu 18.04
Начало » Python для экспертов » Запуск библиотеки PyBrain в Ubuntu 18.04
1 2
ru.gorbacheff
Добрый день.
Использую Python 3.7. Возникла проблема при запуске библиотеки PyBrain в Ubuntu 18.04. Некоторые зависимости, которые нужны для PyBrain установились успешно, но модуль connections не хочет устанавливаться. Вот ошибка, которая появляется:
sergey_gorb@ru:~$ pip install connections
Defaulting to user installation because normal site-packages is not writeable
Collecting connections
Using cached connections-0.1.3.tar.gz (3.7 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

python setup.py egg_info did not run successfully.
exit code: 1


Traceback (most recent call last):
File “<string>”, line 36, in <module>
File “<pip-setuptools-caller>”, line 34, in <module>
File “/tmp/pip-install-69un0fcv/connections_e65e2ddc07d6416d97a7556bfe372c28/setup.py”, line 4, in <module>
from connections import __version__ as src_version
File “/tmp/pip-install-69un0fcv/connections_e65e2ddc07d6416d97a7556bfe372c28/connections.py”, line 283
except SocketError, e:
^
SyntaxError: invalid syntax


note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.

Помогите, пожалуйста, решить проблему.
ZerG
sudo pip install connections
ru.gorbacheff
ZerG
sudo pip install connections
Тоже самое, такая же ошибка.

Я так понимаю, что проблема в этой строке:
except SocketError, e:
^
SyntaxError: invalid syntax

Такая конструкция использовалась в Python 2, а в третьей версии python это выглядит так:
except SocketError as e:
Но если эта библиотека не совместима с Python 3, тогда как быть.
py.user.next
Для установок в третий питон используй программу pip3.
ru.gorbacheff
py.user.next
Для установок в третий питон используй программу pip3.
То же самое:

sergey_gorb@ru:~$ pip3 install connections
Defaulting to user installation because normal site-packages is not writeable
Collecting connections
Using cached connections-0.1.3.tar.gz (3.7 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

python setup.py egg_info did not run successfully.
exit code: 1


Traceback (most recent call last):
File “<string>”, line 36, in <module>
File “<pip-setuptools-caller>”, line 34, in <module>
File “/tmp/pip-install-1xxjrb8a/connections_51fa6660c73c423b87c06c09a1d9c689/setup.py”, line 4, in <module>
from connections import __version__ as src_version
File “/tmp/pip-install-1xxjrb8a/connections_51fa6660c73c423b87c06c09a1d9c689/connections.py”, line 283
except SocketError, e:
^
SyntaxError: invalid syntax


note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
py.user.next
ru.gorbacheff
sergey_gorb@ru:~$ pip3 install connections
sudo pip3 install connections
ru.gorbacheff
py.user.next
sudo pip3 install connections
Вот что выдаёт:
sergey_gorb@ru:~$ sudo pip3 install connections
The directory ‘/home/sergey_gorb/.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/sergey_gorb/.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.
Requirement already satisfied: connections in /usr/local/lib/python3.6/dist-packages/connections-0.1.3-py3.6.egg

То есть получается, что этот пакет установился для python3.6, а мне нужно python3.7
ru.gorbacheff
Использовал такую запись:

sudo python3.7 -m pip install connections
password for sergey_gorb:
WARNING: The directory ‘/home/sergey_gorb/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting connections
Downloading connections-0.1.3.tar.gz (3.7 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

python setup.py egg_info did not run successfully.
exit code: 1


Traceback (most recent call last):
File “<string>”, line 36, in <module>
File “<pip-setuptools-caller>”, line 34, in <module>
File “/tmp/pip-install-9hiek_68/connections_be50aace2bcc4514999366e22a512ed0/setup.py”, line 4, in <module>
from connections import __version__ as src_version
File “/tmp/pip-install-9hiek_68/connections_be50aace2bcc4514999366e22a512ed0/connections.py”, line 283
except SocketError, e:
^
SyntaxError: invalid syntax


note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Тоже самое
ZerG
Ну информация такая что
https://pypi.org/project/connections/
а при попытке зайти на хомяка - пишет гудбай
Судя по всему данная либа канулf в лету
посмотрев на
https://github.com/pybrain/pybrain
можно сказать тоже самжноое.
Думаю вам ну выбрать аналог более современный и активно развивающийся
Данное говно мамонта пересохло
ru.gorbacheff
ZerG
Ну информация такая что https://pypi.org/project/connections/а при попытке зайти на хомяка - пишет гудбайСудя по всему данная либа канулf в лету посмотрев на https://github.com/pybrain/pybrainможно сказать тоже самжноое.Думаю вам ну выбрать аналог более современный и активно развивающийсяДанное говно мамонта пересохло
PyBrain автоматически цепляет именно эту библиотеку. Как в таком случае, переписывать PyBrain нужно?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB