Skip to content
This repository was archived by the owner on Dec 23, 2020. It is now read-only.
This repository was archived by the owner on Dec 23, 2020. It is now read-only.

mac 安装报错 #23

Open
Open

Description

@phoenixg
→ virtualenv --python=/usr/local/bin/python3.6 venv
zsh: command not found: virtualenv

→ ls /usr/local/bin/pyenv-virtualenv --python=/usr/local/bin/python3.6 venv
ls: --python=/usr/local/bin/python3.6: No such file or directory
ls: venv: No such file or directory
/usr/local/bin/pyenv-virtualenv

Activity

  1. 0xbug commented on Nov 20, 2017

    @0xbug
    Owner

    pip3.6 install virtualenv

  2. phoenixg commented on Nov 20, 2017

    @phoenixg
    Author

    现在报这个错误了:

    → pip3.6 install -r requirements.txt
    Collecting celery==3.1.23 (from -r requirements.txt (line 1))
      Downloading celery-3.1.23-py2.py3-none-any.whl (520kB)
        100% |████████████████████████████████| 522kB 1.3MB/s
    Collecting Django==1.9 (from -r requirements.txt (line 2))
      Downloading Django-1.9-py2.py3-none-any.whl (6.6MB)
        100% |████████████████████████████████| 6.6MB 210kB/s
    Collecting django-celery==3.1.17 (from -r requirements.txt (line 3))
      Downloading django-celery-3.1.17.tar.gz (79kB)
        100% |████████████████████████████████| 81kB 3.0MB/s
    Collecting django-cors-middleware==1.2.0 (from -r requirements.txt (line 4))
      Downloading django-cors-middleware-1.2.0.tar.gz
    Collecting django-filter==0.13.0 (from -r requirements.txt (line 5))
      Downloading django_filter-0.13.0-py2.py3-none-any.whl
    Collecting djangorestframework==3.4.1 (from -r requirements.txt (line 6))
      Downloading djangorestframework-3.4.1-py2.py3-none-any.whl (705kB)
        100% |████████████████████████████████| 706kB 1.5MB/s
    Collecting djangorestframework-word-filter==0.1.1 (from -r requirements.txt (line 7))
      Downloading djangorestframework_word_filter-0.1.1-py2.py3-none-any.whl
    Collecting psycopg2==2.6.2 (from -r requirements.txt (line 8))
      Downloading psycopg2-2.6.2.tar.gz (376kB)
        100% |████████████████████████████████| 378kB 2.0MB/s
        Complete output from command python setup.py egg_info:
        running egg_info
        creating pip-egg-info/psycopg2.egg-info
        writing pip-egg-info/psycopg2.egg-info/PKG-INFO
        writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
        writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
        writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
        Error: pg_config executable not found.
    
        Please add the directory containing pg_config to the PATH
        or specify the full executable path with the option:
    
            python setup.py build_ext --pg-config /path/to/pg_config build ...
    
        or with the pg_config option in 'setup.cfg'.
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sc/rp8kdvtn233gcdpdh48dtdkm0000gn/T/pip-build-opeyxn4z/psycopg2/
    (venv)
    
    
  3. 0xbug commented on Nov 20, 2017

    @0xbug
    Owner

    安装postgresql了吗

  4. phoenixg commented on Nov 20, 2017

    @phoenixg
    Author

    之前没有安装,现在我通过 brew install postgresql 安装好了。 执行第二条同步命令时报错:

    → python3 manage.py migrate
    Traceback (most recent call last):
      File "manage.py", line 10, in <module>
        execute_from_command_line(sys.argv)
    
    
      File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
        utility.execute()
      File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 342, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 348, in run_from_argv
        self.execute(*args, **cmd_options)
      File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 399, in execute
        output = self.handle(*args, **options)
      File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 89, in handle
        executor = MigrationExecutor(connection, self.migration_progress_callback)
      File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 20, in __init__
        self.loader = MigrationLoader(self.connection)
      File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 49, in __init__
        self.build_graph()
      File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 176, in build_graph
        self.applied_migrations = recorder.applied_migrations()
      File "/usr/local/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
        self.ensure_schema()
      File "/usr/local/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 52, in ensure_schema
        if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
      File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 231, in cursor
        cursor = self.make_debug_cursor(self._cursor())
      File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 204, in _cursor
        self.ensure_connection()
      File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 199, in ensure_connection
        self.connect()
      File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 170, in connect
        conn_params = self.get_connection_params()
      File "/usr/local/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 157, in get_connection_params
        "settings.DATABASES is improperly configured. "
    django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the NAME value.
    

    可是我从没连过 postgresql,麻烦问一下客户端连接要怎么填写连接参数?

    DATABASES = {
          'default': {
              'ENGINE': 'django.db.backends.postgresql',
              'NAME': '',
              'USER': '',
              'PASSWORD': '',
              'HOST': '127.0.0.1',
              'PORT': '5432',
          }
    }
    
  5. phoenixg commented on Nov 20, 2017

    @phoenixg
    Author

    解决了, 我好像都装好了, 现在访问 http://127.0.0.1:8000/ 有界面了, 但是要上传 har 文件, 怎么配合 charles 使用呢?

  6. 0xbug commented on Nov 20, 2017

    @0xbug
    Owner

    image
    选择har

  7. Mustard404 commented on May 17, 2018

    @Mustard404

    → python3 manage.py migrate
    哥们,这个怎么解决的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions