Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Installing on virtualenv (linux)

Shinebayar G edited this pageSep 3, 2019 ·3 revisions
  1. Install python virtualenv using (replaceapt with your package manager)sudo apt install python3-venv
  2. Create virtualenv namedenvname for python3 usingpython3 -m venv any/path/envname
  3. Enter to virtual envsource any/path/envname/bin/activate
  4. Check python version usingpython -V
  5. Create a folder for script server and navigate to itmkdir -p any/path/script-server && cd any/path/script-server
  6. Download latest releasewget https://github.com/bugy/script-server/releases/latest/download/script-server.zip
  7. Extract zip contentsunzip script-server.zip (If unzip command not found, install unzip withsudo apt-get install unzip)
  8. Install requirementspip install -r requirements.txt
  9. Run the serverpython launcher.py

Bonus:If using virtualenv's python, thensystemd startup script python path would be:

  1. Find out virtualenv's python path (When virtualenv is activated)which pythoncopy result
  2. Edit/lib/systemd/system/script-server.serviceExecStart=/usr/bin/python3 would be ->paste hereExample something like this:/home/user/script-server/envname/bin/python

The similar change should be done for init.d

Notes:If you're getting

pip install -r requirements.txtCollecting typing (from -r requirements.txt (line 1))  Downloading https://files.pythonhosted.org/packages/4a/bd/eee1157fc2d8514970b345d69cb9975dcd1e42cd7e61146ed841f6e68309/typing-3.6.6-py3-none-any.whlCollecting tornado<6 (from -r requirements.txt (line 2))  Downloading https://files.pythonhosted.org/packages/e6/78/6e7b5af12c12bdf38ca9bfe863fcaf53dc10430a312d0324e76c1e5ca426/tornado-5.1.1.tar.gz (516kB)    100% |████████████████████████████████| 522kB 2.3MB/s Building wheels for collected packages: tornado  Running setup.py bdist_wheel for tornado ... error  Complete output from command /home/shinee/sites/script-server/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9m5zqpq7/tornado/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp8sqzva6bpip-wheel- --python-tag cp36:  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]     or: -c --help [cmd1 cmd2 ...]     or: -c --help-commands     or: -c cmd --help    error: invalid command 'bdist_wheel'    ----------------------------------------  Failed building wheel for tornado  Running setup.py clean for tornadoFailed to build tornadoInstalling collected packages: typing, tornado  Running setup.py install for tornado ... doneSuccessfully installed tornado-5.1.1 typing-3.6.6

error either update your pip version or install wheel package.

pip install --upgrade pip orpip install -U wheel

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp