Как установить vowpalwabbit через pip - PullRequest
0 голосов
/ 18 мая 2018

Я пытаюсь установить vowpalwabbit через pip:

sudo pip install vowpalwabbit
The directory '/home/user/.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/user/.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 vowpalwabbit
  Downloading https://files.pythonhosted.org/packages/56/45/278a8427aa859888b3fb3e3debeea086557df8def22a23561bfe45e1fb03/vowpalwabbit-8.5.0.tar.gz (1.5MB)
    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.5MB 938kB/s 
Installing collected packages: vowpalwabbit
  Running setup.py install for vowpalwabbit ... done
Successfully installed vowpalwabbit-8.5.0
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Но получаю ошибку:

python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vowpalwabbit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'vowpalwabbit'

Обновление:

Проверкаpython2:

python2
Python 2.7.6 (default, Oct 26 2016, 20:30:19) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import vowpalwabbit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named vowpalwabbit

which python
/home/user/anaconda3/bin/python
which pip
/home/user/anaconda3/bin/pip


python -m pip install vopalwabbit
Collecting vopalwabbit
  Could not find a version that satisfies the requirement vopalwabbit (from versions: )
No matching distribution found for vopalwabbit

И что-то странное при удалении:

pip uninstall vopalwabbit
Skipping vopalwabbit as it is not installed.

Update2:

Последние 2 команды имеют опечатку, вот это реальновывод:

sudo python -m pip install vowpalwabbit
The directory '/home/user/.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/user/.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 vowpalwabbit
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/56/45/278a8427aa859888b3fb3e3debeea086557df8def22a23561bfe45e1fb03/vowpalwabbit-8.5.0.tar.gz (1.5MB)
    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.5MB 787kB/s 
Installing collected packages: vowpalwabbit
  Running setup.py install for vowpalwabbit ... done
Successfully installed vowpalwabbit-8.5.0
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

и import vowpalwabbit работает в python2.

1 Ответ

0 голосов
/ 18 мая 2018

Это давняя проблема наличия двух версий python в вашем дистрибутиве.Vopalwabbit установлен на 2.7 версии python в вашей системе, но не на 3.6.

Чтобы правильно установить это, вы должны назвать его так:

python3 -m pip install vopalwabbit
...