I'm have installed Trac on Ubuntu 14.04.1 using the following command:
$ sudo apt-get install trac trac-accountmanager trac-graphviz trac-icalviewplugin trac-
mastertickets trac-wysiwyg trac-wikitablemacro trac-tags trac-customfieldadmin trac-
datefieldplugin
This I believe has install Trac 1.0.1-2, but when I run a simple command such as:
$ sudo trac-admin --version
I get the following trace:
Traceback (most recent call last):
File "/usr/bin/trac-admin", line 9, in <module>
load_entry_point('Trac==1.0.1', 'console_scripts', 'trac-admin')()
File "/usr/lib/python2.7/dist-packages/trac/admin/console.py", line 567, in run
translation.activate(locale)
File "/usr/lib/python2.7/dist-packages/trac/util/translation.py", line 325, in activate
translations.activate(locale, env_path)
File "/usr/lib/python2.7/dist-packages/trac/util/translation.py", line 152, in activate
t.add(Translations.load(locale_dir, locale or 'en_US',
AttributeError: 'NullTranslations' object has no attribute 'add'
I am not familiar with python, any ideas why this is occurring would be appreciated.
To resolve the issue you can either upgrade to Trac 1.0.2, or downgrade to Babel 0.9.6. See comment:1:ticket:11621 for details.
Related
I tried to instlall Python3-pip on my Linux Debian 8 Server with following command: sudo apt install python3-pip. That worked fine without any problem.
But if I'm checking now the Version of this pip3 module, I get follwing error:
$ pip3 --version
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in <module>
from pip._internal.cli.main import main
File "/usr/local/lib/python3.4/dist-packages/pip/__init__.py", line 1, in <module>
from typing import List, Optional
ImportError: cannot import name 'List'
I tried to somehow solve this problem, but did not get any solution up to now...
Does anybody have had a similar Problem?
after this command: $ autoninja -C out/Default chrome
deduces this error, how to fix? Help me please
[2549/55054] ACTION //gpu/config:process_json(//build/toolchain/linux:clang_x64)
FAILED: gen/gpu/config/gpu_driver_bug_list_arrays_and_structs_autogen.h gen/gpu/config/gpu_driver_bug_list_autogen.cc gen/gpu/config/gpu_driver_bug_list_autogen.h gen/gpu/config/gpu_driver_bug_list_exceptions_autogen.h gen/gpu/config/software_rendering_list_arrays_and_structs_autogen.h gen/gpu/config/software_rendering_list_autogen.cc gen/gpu/config/software_rendering_list_autogen.h gen/gpu/config/software_rendering_list_exceptions_autogen.h
python3 ../../gpu/config/process_json.py --output-dir gen/gpu/config --skip-testing-data --os-filter linux
Traceback (most recent call last):
File "../../gpu/config/process_json.py", line 1061, in <module>
sys.exit(main(sys.argv[1:]))
File "../../gpu/config/process_json.py", line 1036, in main
script_dir, options.output_dir, options.os_filter)
File "../../gpu/config/process_json.py", line 925, in process_software_rendering_list
'Software')
File "../../gpu/config/process_json.py", line 832, in process_json_file
json_data = json.load(json_file)
File "/usr/lib/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
[2552/55054] CXX obj/skia/skia_core_and_effects/SkReadBuffer.o
ninja: build stopped: subcommand failed.
Help me
After digging into the problem, I found that the problem is in the Python version. I was using 3.5.2, which is the latest version for Ubuntu 16.04 LTS. But it is not sufficient for building recent versions of Chromium as it seems to require at least 3.7 or above (this comment is not based on any official docs, it is just my guess.)
First check your python3 version with python3 --version. If it is the case, upgrade your Linux distro and run build/install-build-deps.sh.
Alternatively, update python3 only with the following commands:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
sudo ln -sf /usr/bin/python3.9 /usr/bin/python3
I try to install a package in Windows 10 (mingw64) and get this error:
IEUser#MSEDGEWIN10 MINGW64 /c/Users/IEUser/PycharmProjects/myapp_msi-msys/myapp_msi
$ pip install -e git+https://source.example.lan:40443/repos/myapp_common#egg=myapp_common
Obtaining myapp_common from git+https://source.example.lan:40443/repos/myapp_common#egg=myapp_common
Cloning https://source.example.lan:40443/repos/myapp_common to c:/users/ieuser/pycharmprojects/myapp_msi-msys/myapp_msi/src/myapp-common
Username for 'https://source.example.lan:40443':
Password for 'https://tguettler#source.example.lan:40443':
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/__init__.py", line 191, in <module>
monkey.patch_all()
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/monkey.py", line 101, in patch_all
patch_for_msvc_specialized_compiler()
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/monkey.py", line 164, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
File "C:/msys64/mingw64/lib/python2.7/site-packages/setuptools/monkey.py", line 151, in patch_params
mod = import_module(mod_name)
File "C:/msys64/mingw64/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "C:/msys64/mingw64/lib/python2.7/distutils/msvc9compiler.py", line 306, in <module>
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
What can I do to fix this?
I was following these instructions to set up my development environment: https://www.gtk.org/download/windows.php
Update
Just for the records, I switched from gtk to qt (PySide2) and now I can use the default Python for windows. Everything is much easier now.
In MSYS2, many of the issues are patched downstream with the MINGW-packages that go in to the pacman repository. In this case, the reason you are getting this error is that you have setuptools pip installed, instead of installed using the pacman repository. To fix this issue:
pip uninstall setuptools
pacman -S mingw-w64-x86_64-python-setuptools
or if you are using modern Python:
pip3 uninstall setuptools
pacman -S mingw-w64-x86_x64-python3-setuptools
I want to learn django so I tried to create a virtual env and I am getting this error:
mkvirtualenv django
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2881, in <module>
parse_requirements(__requires__), Environment()
File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 596, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.8.2
I haven't used python in a while so i'm not sure what the issue is:
virtualenv --version
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2881, in <module>
parse_requirements(__requires__), Environment()
File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 596, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.8.2
You're using mkvirtualenv which is a virtualenvwrapper command. You probably do not have virtualenvwrapper installed.
Type virtualenvwrapper in your command line and observe the input. If you get something like command not found, then you should install it first.
You should install it with pip like so pip install virtualenvwrapper.
There are some post-installation steps, the most important one being source /usr/local/bin/virtualenvwrapper.sh that makes commands like mkvirtualenv, rmvirtualenv available.
See virtualenvwrapper's documentation.
Alternatively, you can also just make use of virtualenv. Check that you have it installed like so
virtualenv --version
If you do not, you can install it with pip. Once you have it installed, you can create your virtualenv like so
virtualenv <name> in the directory of your choice.
What do I do wrong?
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==7.1.0', 'console_scripts', 'pip')()
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1- py3.4.egg/pkg_resources/__init__.py", line 558, in load_entry_point
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2682, in load_entry_point
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2355, in load
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2361, in resolve
ImportError: No module named 'pip'
Stackoverflow asked me to type more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more
Try to fix pip installation with:
sudo apt-get install python3-pip
I've had the same issue and this worked for me. Maybe it's because you only installed pip for an earlier version of python or you intalled it from source and not from you distributions package management.
It sounds like your pip variable isn't set or you're trying to use conflicting environments. If you want to get the python package pymongo installed on your 3.4 version look to use:
/usr/local/bin/pip3.4 install pymongo
Then you can verify by testing in the 3.4 interpreter by running:
python3.4
>>>import pymongo
>>>
In the future look at using virtualenvs, they can be really easy and clean to work with while controlling your packages neatly. Hope this helps!