Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Python executable hardcoded introduces error inside virtualenv #1161

Closed
larroy opened this issue Oct 8, 2016 · 1 comment
Closed

Python executable hardcoded introduces error inside virtualenv #1161

larroy opened this issue Oct 8, 2016 · 1 comment

Comments

@larroy
Copy link
Contributor

larroy commented Oct 8, 2016

ubuntu@ubuntu-xenial:~/synapse$ /home/ubuntu/synapse/bin/python  bin/synctl start
Starting ...
/usr/bin/python: No module named synapse.app
error starting (exit code: 1); see above for logs
erikjohnston added a commit that referenced this issue Oct 14, 2016
Use sys.executable instead of hardcoded python. fixes #1161
@shibinmp3
Copy link

Hi, when I am executing following commands to install Riot.Im in my server I am getting following errors I followed this link https://www.vultr.com/docs/create-a-chat-server-using-matrix-synapse-and-riot-on-centos-7#Setting_up_Let_s_Encrypt_Certificates".
But i got the error in configuring synapse as follows. As I am a learner in servers and python, all these errors are new for me. from what i understood. I missed something when i installed development tools. please help

[shibin@s148-72-210-106 ~]$ sudo yum groupinstall "Development Tools"           Loaded plugins: fastestmirror, universal-hooks, versionlock
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     |  16 kB     00:00
 * EA4: 203.174.85.202
 * cpanel-addons-production-feed: 203.174.85.202
 * base: centos.sonn.com
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * extras: repos.lax.quadranet.com
 * ius: mirrors.kernel.org
 * remi-php71: ftp.riken.jp
 * remi-php72: ftp.riken.jp
 * remi-php73: ftp.riken.jp
 * remi-safe: ftp.riken.jp
 * updates: mirrors.thaidns.co.th
EA4                                                      | 2.9 kB     00:00
cpanel-addons-production-feed                            | 2.9 kB     00:00
base                                                     | 3.4 kB     00:00
epel                                                     | 5.3 kB     00:00
extras                                                   | 3.4 kB     00:00
ius                                                      | 2.6 kB     00:00
pgdg10                                                   | 3.6 kB     00:00
pgdg11                                                   | 3.6 kB     00:00
pgdg94                                                   | 3.6 kB     00:00
pgdg95                                                   | 3.6 kB     00:00
pgdg96                                                   | 3.6 kB     00:00
remi-php71                                               | 3.0 kB     00:00
remi-php72                                               | 3.0 kB     00:00
remi-php73                                               | 3.0 kB     00:00
remi-safe                                                | 3.0 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/7): pgdg10/7/x86_64/primary_db                          | 280 kB   00:02
(2/7): pgdg11/7/x86_64/primary_db                          | 226 kB   00:02
(3/7): pgdg94/7/x86_64/primary_db                          | 298 kB   00:02
(4/7): pgdg96/7/x86_64/primary_db                          | 293 kB   00:00
(5/7): pgdg95/7/x86_64/primary_db                          | 292 kB   00:00
(6/7): epel/x86_64/primary_db                              | 6.8 MB   00:03
(7/7): epel/x86_64/updateinfo                              | 977 kB   00:03
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
[shibin@s148-72-210-106 ~]$ yum groups mark install
Loaded plugins: fastestmirror, universal-hooks, versionlock
Error: Need a group or list of groups
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
fs             Acts on the filesystem data of the host, mainly for removing docs/lanuages for minimal hosts.
fssnapshot     Creates filesystem snapshots, or lists/deletes current snapshots.
groups         Display, or use, the groups information
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
install        Install a package or packages on your system
list           List a package or groups of packages
load-transaction load a saved transaction from filename
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repo-pkgs      Treat a repo. as a group of packages, so we can install/remove all of them
repolist       Display the configured software repositories
search         Search package details for the given string
shell          Run an interactive yum shell
swap           Simple way to swap packages, instead of using shell
update         Update a package or packages on your system
update-minimal Works like upgrade, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo     Acts on repository update information
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.
versionlock    Control package version locks.


Options:
  -h, --help            show this help message and exit
  -t, --tolerant        be tolerant of errors
  -C, --cacheonly       run entirely from system cache, don't update cache
  -c [config file], --config=[config file]
                        config file location
  -R [minutes], --randomwait=[minutes]
                        maximum command wait time
  -d [debug level], --debuglevel=[debug level]
                        debugging output level
  --showduplicates      show duplicates, in repos, in list/search commands
  -e [error level], --errorlevel=[error level]
                        error output level
  --rpmverbosity=[debug level name]
                        debugging output level for rpm
  -q, --quiet           quiet operation
  -v, --verbose         verbose operation
  -y, --assumeyes       answer yes for all questions
  --assumeno            answer no for all questions
  --version             show Yum version and exit
  --installroot=[path]  set install root
  --enablerepo=[repo]   enable one or more repositories (wildcards allowed)
  --disablerepo=[repo]  disable one or more repositories (wildcards allowed)
  -x [package], --exclude=[package]
                        exclude package(s) by name or glob
  --disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
  --disableincludes=[repo]
                        disable includepkgs for a repo or for everything
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  --releasever=RELEASEVER
                        set value of $releasever in yum config and repo files
  --downloadonly        don't update, just download
  --downloaddir=DLDIR   specifies an alternate directory to store packages
  --setopt=SETOPTS      set arbitrary config and repo options
  --bugfix              Include bugfix relevant packages, in updates
  --security            Include security relevant packages, in updates
  --advisory=ADVS, --advisories=ADVS
                        Include packages needed to fix the given advisory, in
                        updates
  --bzs=BZS             Include packages needed to fix the given BZ, in
                        updates
  --cves=CVES           Include packages needed to fix the given CVE, in
                        updates
  --sec-severity=SEVS, --secseverity=SEVS
                        Include security relevant packages matching the
                        severity, in updates

  Plugin Options:
[shibin@s148-72-210-106 ~]$ source /opt/synapse/bin/activate && cd /opt/synapse
(synapse) [shibin@s148-72-210-106 synapse]$ synctl start
No config file found
To generate a config file, run '/opt/synapse/bin/python2.7 -B -m synapse.app.homeserver -c homeserver.yaml --generate-config --server-name=<server name> --report-stats=<yes/no>'

(synapse) [shibin@s148-72-210-106 synapse]$ cd /opt/synapse
(synapse) [shibin@s148-72-210-106 synapse]$ python -m synapse.app.homeserver --server-name asianchatworld.com --config-path homeserver.yaml --generate-config --report-stats=yes
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/synapse/lib/python2.7/site-packages/synapse/app/homeserver.py", line 663, in <module>
    main()
  File "/opt/synapse/lib/python2.7/site-packages/synapse/app/homeserver.py", line 658, in main
    hs = setup(sys.argv[1:])
  File "/opt/synapse/lib/python2.7/site-packages/synapse/app/homeserver.py", line 331, in setup
    config_options,
  File "/opt/synapse/lib/python2.7/site-packages/synapse/config/_base.py", line 315, in load_or_generate_config
    with open(config_path, "w") as config_file:
IOError: [Errno 13] Permission denied: 'homeserver.yaml'
(synapse) [shibin@s148-72-210-106 synapse]$ sudo python -m synapse.app.homeserver --server-name asianchatworld.com --config-path homeserver.yaml --generate-config --report-stats=yes
/bin/python: No module named synapse.app
(synapse) [shibin@s148-72-210-106 synapse]$ pip install synapse.app
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting synapse.app
  ERROR: Could not find a version that satisfies the requirement synapse.app (from versions: none)
ERROR: No matching distribution found for synapse.app

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants