Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

718
Views
"Este paquete no debería ser accesible en Python 3" cuando se ejecuta python3

Estaba tratando de usar virtualenv para cambiar entre versiones de python antes de saber que podía usar python y python3 en mi Mac.

Pude arreglar mi versión de python 2.7 para que aún funcione bien, sin embargo, ahora cuando ejecuto python3, aparece este error:

 Failed to import the site module Traceback (most recent call last): File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 544, in <module> main() File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 530, in main known_paths = addusersitepackages(known_paths) File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 282, in addusersitepackages user_site = getusersitepackages() File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 258, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 248, in getuserbase USER_BASE = get_config_var('userbase') File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 601, in get_config_var return get_config_vars().get(name) File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 580, in get_config_vars import _osx_support File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/_osx_support.py", line 4, in <module> import re File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/re.py", line 125, in <module> import functools File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/functools.py", line 21, in <module> from collections import namedtuple File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/collections/__init__.py", line 32, in <module> from reprlib import recursive_repr as _recursive_repr File "/usr/local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module> raise ImportError('This package should not be accessible on Python 3. ' ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

Busqué este error en línea, pero la mayor parte de la conversación se centró en arreglar el parche y luego actualizar virtualenv. Sin embargo, esto todavía no soluciona mi problema.

 python3 -V: Python 3.6.0 virtualenv --version: 15.1.0 env | egrep -i 'python|virtualenv': PYTHONPATH=/usr/local/lib/python2.7/site-packages:
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Su entorno contiene PYTHONPATH=/usr/local/lib/python2.7/site-packages

Esto no funciona con Python 3 por razones obvias. Para eliminarlo:

 unset PYTHONPATH
over 4 years ago · Santiago Trujillo Report

0

Resolví mi problema con el siguiente comando

 sudo pip install virtualenv --upgrade virtualenv -p python3 env
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!