When I am installing light package in python 3.6.5 by using the command
pip install light
I am getting this error:
Collecting light
Using cached https://files.pythonhosted.org/packages/74/e5/78270f0aec7135793a85d4898b0075b741f7e2041011c24d8af76c9a3671/light-0.0.1.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Bhanu\AppData\Local\Temp\pip-install-p6x112xj\light\setup.py", line 43, in <module>
with open(os.path.join(thisdir, "requirements.txt"), "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Bhanu\\AppData\\Local\\Temp\\pip-install-p6x112xj\\light\\requirements.txt'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\Bhanu\AppData\Local\Temp\pip-install-p6x112xj\light\
If you are using python 3 then you need to use pip3 to install packages unless you have activated a virtual environment with python 3
It looks like that project is not anymore maintained.
https://pypi.org/project/light/
https://github.com/riga/light (leads to a 404 page)
If you download the entire source from pypi (light-0.0.1.tar.gz), untar it to a light-0.0.1 directory, and check setup.py, there's a part of the code that's looking for a requirements.txt file:
42 install_requires = []
43 with open(os.path.join(thisdir, "requirements.txt"), "r") as f:
44 install_requires.extend(line.strip() for line in f.readlines() if line.strip())
45
But it's obvious that requirements.txt does not exist:
|- light
|- light.egg-info
|- PKG-INFO
|- setup.cfg
|- setup.py
You can try creating a blank requirements.txt file in the same directory or commenting-out those lines from setup.py that's looking for requirements.txt:
install_requires = []
#with open(os.path.join(thisdir, "requirements.txt"), "r") as f:
# install_requires.extend(line.strip() for line in f.readlines() if line.strip())
Then install the package manually:
$ cd <path/to/light-0.0.1>
$ pip3 install .
It's going to install successfully.
Though, I would suggest staying away from this package as it looks like it's not maintained anymore or isn't ready yet for a production release.
Related
I was installing Plumi for creating a production site. after installing plumi.app i faced below error whie running buildout using command : python3 bootstrap.py -c production.cfg
Note:: Zope is installed and zope user is added..
The ERROR IS BELOW::enter image description here
root#Saif:/home/plumi.app# /bin/python3 bootstrap.py && ./bin/buildout -v
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmpvwkpnumd
Now working in /tmp/tmpvwkpnumd/setuptools-33.1.1
Building a Setuptools egg in /tmp/tmpgfkbh3om
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/tmpgfkbh3om/setuptools-33.1.1-py3.8.egg
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
No local packages or working download links found for zc.buildout
error: Could not find suitable distribution for Requirement.parse('zc.buildout')
Traceback (most recent call last):
File "bootstrap.py", line 171, in <module>
raise Exception(
Exception: Failed to execute command:
'/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmpgfkbh3om', 'zc.buildout'
root#Saif:/home/plumi.app# ^C
root#Saif:/home/plumi.app# python3 bootstrap.py -c production.cfg
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmp6dqehae9
Now working in /tmp/tmp6dqehae9/setuptools-33.1.1
Building a Setuptools egg in /tmp/tmpdja0839z
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/tmpdja0839z/setuptools-33.1.1-py3.8.egg
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
Couldn't find index page for 'zc.buildout' (maybe misspelled?)
No local packages or working download links found for zc.buildout
error: Could not find suitable distribution for Requirement.parse('zc.buildout')
Traceback (most recent call last):
File "bootstrap.py", line 171, in <module>
raise Exception(
Exception: Failed to execute command:
'/usr/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmpdja0839z', 'zc.buildout'
warning: no files found matching '*' under directory 'setuptools/_vendor'
I found out that setuptools version 33.1.1 doesn't have vendor folder.
https://github.com/pypa/setuptools/tree/v33.1.1/setuptools
In my project, I am using tox with nosetests. Using PyCharm, my tox pipeline was passing completely including all the tests. When I execute tox on a Ubuntu18.04 container with python3, it gives me the following error:
ImportError: No module named 'my_project'
leading to the following error at the end:
ERROR: InvocationError for command /.tox/py36/bin/nosetests (exited with code 1)
my_project is the name of the module I am testing and the directory structure looks like this under /, the root dir from which I am executing tox:
my_project/
tests/
tox.ini
setup.cfg
other files
My tox.ini looks as follows:
[tox]
envlist = py36
[testenv]
commands = python3 setup.py build
nosetests
deps = -r{toxinidir}/test-requirements.txt
I have tried to provide the path to project in different ways to nosetests command but none of that works. One line that interests me is in the initial output of tox:
py36 installed: my_project # file:///.tox/.tmp/package/1/my_project-0.4.post52.dev256143400.zip,
which leads me to think if this is the reason that nosetests does not find my_project.
For details, the stack trace for the error is as follows:
ERROR: Failure: ImportError (No module named 'my_project')
Traceback (most recent call last):
File "/.tox/py36/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/.tox/py36/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 79, in importFromDir
fh, filename, desc = find_module(part, path)
File "/usr/lib/python3.6/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'my_project'
I see three possible offenders.
(1) python3 setup.py build should not exist in the commands section.
# the build command is redundant, there is a special option for this.
commands = python3 setup.py build
nosetests
# The install command with it's default
install_command=python -m pip install {opts} {packages}(ARGV)
deps = -r{toxinidir}/test-requirements.txt
(2) And with Pycharm you might have added your project as a sources root (right click folder > mark directory as > sources root). Or configured it otherwise (PATH variable perhaps?) that makes my_project available in context to running it in Pycharm? This should not happen inside tox though, unless you have whitelist externals or sitepackages turned to True..
So when installed on a container this link does not exist.
(3) I can't help but notice the abscence of a setup.py or pyproject.toml. Files used to install my_project. E.g. run this command locally and debug your installation if it doesn't work:
pip install .
I'm use openstack queens and devstack,ubuntu16.04
I want to create a dashboard,when i use follow commands
$ mkdir openstack_dashboard/dashboards/mydashboard
$ tox -e manage -- startdash mydashboard --target openstack_dashboard/dashboards/mydashboard
from openstack website https://docs.openstack.org/horizon/queens/contributor/tutorials/dashboard.html#the-quick-version
i get errors:
js#dmdb-23:~/Desktop/openstack.bak/stack/horizon$ tox -e manage -- startdash mydashboard --target openstack_dashboard/dashboards/mydashboard
manage develop-inst-noop: /home/js/Desktop/openstack.bak/stack/horizon
manage installed: horizon==13.0.2.dev22
manage run-test-pre: PYTHONHASHSEED='2095316472'
manage runtests: commands[0] |
/home/js/Desktop/openstack.bak/stack/horizon/.tox/manage/bin/python
/home/js/Desktop/openstack.bak/stack/horizon/manage.py startdash
mydashboard --target openstack_dashboard/dashboards/mydashboard
Traceback (most recent call last): File "/home/js/Desktop/openstack.bak/stack/horizon/manage.py", line 18, in
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management ERROR:
InvocationError for command
'/home/js/Desktop/openstack.bak/stack/horizon/.tox/manage/bin/python
/home/js/Desktop/openstack.bak/stack/horizon/manage.py startdash
mydashboard --target openstack_dashboard/dashboards/mydashboard'
(exited with code 1)
This is the first time i answer questions,so the format may be poor,but i hope someone can help me ,thanks a lot.
I used the book "Deep Learning with R" since one month now, and it enables me to make my first neural networks.
I am using Ubuntu. Until 2 days ago, everything was OK and worked fine. But two days ago I updated my Ubuntu to Ubuntu 18.02. Since then, my R code is not working anymore.
I have re-done what is recommended in the book (and what has worked one month ago):
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install python-pip python-dev
$ sudo apt-get install build-essential cmake git unzip pkg-config libopenblas-dev liblapack-dev
I had no error.
then in R:
install.packages("keras")
library(keras)
install_keras()
This last command is supposed to install the core Keras library along with its dependencies in a Python virtual environment using TensorFlow.
But I obtained the following error that I really do not understand:
> install_keras()
Using existing virtualenv at ~/.virtualenvs/r-tensorflow
Upgrading pip ...
Traceback (most recent call last):
File "/home/baragatt/.virtualenvs/r-tensorflow/bin/pip", line 7, in <module>
from pip._internal import main
File "/home/baragatt/.virtualenvs/r-tensorflow/local/lib/python2.7/site-packages/pip/_internal/__init__.py", line 5, in <module>
import logging
File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File "/usr/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Erreur : Error 1 occurred installing TensorFlow
I have re-installed R, python, tensorflow, but I always have the same error. I do not understand this error. Maybe this is a problem with the virtualenv?
Can someone help me please? It is so frustrating, because two days ago my code was running, and now impossible to work...
I am working with Ubuntu 18.02, at the installed versions are python 2.7.15~rc1-1, R-3.4.4 and tensorflow-1.10.0.
Thanks a lot for this post. I do not really understand what the commands in this post are supposed to fix. But I have done the following:
cd /home/baragatt/.virtualenvs/r-tensorflow/
Then, as proposed in the post:
virtualenv . --system-site-packages
I obtained the following messages:
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/baragatt/.virtualenvs/r-tensorflow/bin/python2
Not overwriting existing python script /home/baragatt/.virtualenvs/r-tensorflow/bin/python (you must use /home/baragatt/.virtualenvs/r-tensorflow/bin/python2)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 946, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1417, in install_python
os.symlink(py_executable_base, full_pth)
OSError: [Errno 17] File exists
I also tried:
virtualenv -p /usr/bin/python2.7 .
And I obtained:
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/baragatt/.virtualenvs/r-tensorflow/bin/python2.7
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 946, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1278, in install_python
shutil.copyfile(executable, py_executable)
File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 40] Too many levels of symbolic links: '/home/baragatt/.virtualenvs/r-tensorflow/bin/python2.7'
I finally find a solution, by looking at different forums.
I thought that the problem should be because of the virtualenvironment that should be created when doing the following command in R.
install_keras()
Hence, I deleted the virtual environment(s) by deleting the directory in which these environements are located (I imagine).
cd ~/.virtualenvs
rm -r r-tensorflow/
Then I have tried the following commands in R
install.packages("keras")
library(keras)
install_keras()
And it works! Honestly, I still do not understand what was the problem that occured after my Ubuntu update.
I was install openstack swift-all-in-one on my virtual mechine with system Ubuntu Destop 14.04.
It told me that my liberausercode has deprecating version that I need to upgrade when I excute '$HOME/swift/.unittests' in terminal. But the question is how can I upgrade it.
Here is the response:
liberasurecode[11645]: liberasurecode_backend_open: dynamic linking error libJerasure.so.2: cannot open shared object file: No such file or directory
ERROR: Failure: MissingSectionHeaderError (File contains no section headers. file: /etc/swift/swift.confg, line: 1 ' cd $HOME/swift/doc; sudo cp -r saio/swift /etc/swift; cd -\n')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
MissingSectionHeaderError: File contains no section headers.
file: /etc/swift/swift.confg, line: 1
' cd $HOME/swift/doc; sudo cp -r saio/swift /etc/swift; cd -\n'
pyeclib: WARNING: DEPRECATED WARNING: your liberasurecode 1.0.9 will be deprecated in the near future because of the issue https://bugs.launchpad.net/swift/+bug/1639691; Please upgrade to >=1.3.1 and rebuild pyeclib to suppress this message
--------------------- >> end captured logging << ---------------------
FAILED (errors=1)
/root
On websit : https://github.com/openstack/liberasurecode, I find the answer how to update the library.