Comments (16)
@apandada1 Anaconda as @LordAmit mentioned is a Python distribution packaged for scientists and analysts. It installs in the users home directory and changes Python's path to Anacondas' python (in .bashrc, or zshrc, etc...) SO basically when I am calling python I am using the Anaconda Python and its packages.
Using apt-get
will install the packages in the original Python directories which are not being used anymore. Instead pip
and conda
(latter is Anaconda's package manager) install the package in the Anaconda python library directories.
IN short: the apt-get
install doesn't get used.
from brightness.
When user installs it manually, he can run pip install pyside
. But a .deb package (which will be in the PPA) cannot run pip commands while installing, it resolved dependencies using apt-get. The only simple solution is to run the app with usr/bin/python
so that it will work with apt-get's pyside
from brightness.
I am unfamiliar with the term Anaconda. A quick google search shows that it is probably a python distribution focusing on analytics.
I will update the readme and add instructions of installing PySide through pip 😄
Thank you for pointing this out.
from brightness.
I could not understand the problem. Please explain
from brightness.
Just that sudo apt-get install python-pyside was not enough for his system to use the app.
from brightness.
@elmerehbi , I have updated the Readme.md file. If you the instructions are better now and solves this problem - close this issue maybe?
from brightness.
Is there any command to force regular Python?
It is not easy to add the following feature to deb package:
If Anaconda Python is installed : pip install pyside after installation, (this will require adding a bash script)
otherwise, apt-get install python-pyside
from brightness.
@apandada1 @LordAmit I get you. You could replace apt-get install pyside
with pip install pyside
as in the case of Anaconda the path to Python is changed and hence the new pip is going to be used automatically. No need to use conda
.
So instead of the system's package manager (apt-get
here) use Python's package manager pip
from brightness.
No, that's not the solution.
I will have to add dependency in the "control" file in the .deb package.
The dependencies asked here will be installed via apt (dpkg). We cannot use pip here.
What I wanted to know: Is there any specific command which will invoke original Python?
Suppose python --option src/init.py
?
Or, can it be done by replacing #!/usr/bin/python
with path/to/original/python in the init.py file?
from brightness.
@apandada1 I just checked the init.py & it includes /usr/bin/python
. So there's no need to do anything as it points to the system's Python distribution. The only thing that caused a problem was calling python
before the script:
python /src/init.py # returns the error I posted above
./src/init.py # works like a charm
Moreover, since I've got the ppa added I have the older version working too without the need for pyside in Anaconda's python.
from brightness.
@apandada1 , we are talking about the version 2 here.
What we can do, is create a checking mechanism for the existence of Pyside in user's python distribution when the app is run for the first time after installation through the PPA, and then automatically install python-pyside using pip if required. Or ask user to install Python-pyside using pip.
from brightness.
@apandada1 Doesn't running it with ./
suffice instead of explicitly calling python given that the python path is already set in the script?
from brightness.
We can mark it as executable and directly run it (without python init.py
) (that's how v1 PPA works too) . Then there will be no need of checking mechanism, and the problem will be fixed.
Also, @LordAmit How can we ask the user to install using pip if the GUI of the app does not even run? By the way, the issue seems to be solved.
from brightness.
The App GUI runs using PySide, but the app itself can be loaded from a separate script which is not dependent on PySide. That part will execute just like any other Python script.
from brightness.
@LordAmit @apandada1 The solution to this issue is very simply:
sudo apt-get install pip
pip install pyside
No need for sudo apt-get install pyside
as pip used will depend on which python is being used by default:
which python
which pip
In my case this returns:
/home/user/anaconda2/bin/python
/home/user/anaconda2/bin/pip
To get an idea of my installation, here are my Python paths:
where python
/home/user/anaconda2/bin/python
/usr/bin/python
Installing Anaconda will install the Anacconda Python distribution in the sers home directory including all modules. Moreover, when calling python
it will now call Anaconda's python.
from brightness.
Ah ok. Indeed /usr/bin/python should work.
from brightness.
Related Issues (20)
- Sync brightness level across multiple monitors
- Installation failure using yay.... failure occurred in build() [manjaro linux, gnome DE] HOT 1
- Tray Icon HOT 1
- The brightness resets(or we can say the brightness is lost) to full brightness if there comes a new chat message in skype on the ubuntu-20.04. HOT 4
- Crashes when /dev/i2c-* are not accessible for the user
- Fedora package
- Simple for 21+ Current Python3 Version - with Reduced Feature Set HOT 7
- Installation via AUR Failed HOT 1
- Installed with pip, no hassle. But cannot change brightness (can change RGB) of the secondary monitor, Samsung LF27T35, connected by HDMI. Debian 11 on an HP Notebook. Can change brightness of primary display, but have buttons for that already. HOT 1
- Upgrade doc for pip HOT 1
- ModuleNotFoundError: No module named 'brightness_controller_linux HOT 2
- Error when changing color temperature
- Wayland is actually supported. HOT 5
- Make appimage format support HOT 1
- Unable to add repository HOT 3
- Can't pin to dock HOT 4
- Cannot run brightness-controller after installing. Python error with index out of range. HOT 5
- How I handle on Debian 12 HOT 3
- Additionnal actions for installation with pip
- Brightness controller has no effect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brightness.