Errori durante il tentativo di installare "wireless" con pip


0

Ho provato a installare "wireless" con pip ma continuo a ricevere errori.

sudo pip install wireless
The directory '/Users/student/Library/Caches/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 '/Users/student/Library/Caches/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 wireless
/Library/Python/2.7/site-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
/Library/Python/2.7/site-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 wireless-0.3.2.tar.gz
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 412, in run_egg_info
    self.setup_py, self.name,
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 387, in setup_py
    import setuptools  # noqa
  File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/Library/Python/2.7/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
/Library/Python/2.7/site-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

Come hai installato pip ? Hai un'installazione python3 (ad esempio con homebrew) oltre allo stock Python 2.7?
klanomath,

Ho eseguito l'installazione con la versione di Python 3 di pip e installato, ma il programma che sto cercando di eseguire non è ancora riuscito a trovare il modulo "wireless". da wireless import Wireless ImportError: nessun modulo chiamato wireless
John Doe,

Risposte:


1

Un modo corretto per installare pip e wireless in un doppio ambiente Python (ad esempio OS X Python 2.7 e brew's Python 3.6.1) è il metodo get-pip.py delineato qui: Come posso usare pip 3 con Python 3.4? .

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo ln -s /usr/local/bin/pip2.7 /usr/local/bin/pip2 #usually not necessary because pip2 already exists
sudo python3 get-pip.py

Poi a seconda di dove si desidera installare wireless sia

sudo pip2 install wireless #installs to /Library/Python/2.7/site-packages/wireless

o

sudo pip3 install wireless #installs to /usr/local/lib/python3.6/site-packages/wireless

o entrambi.

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.