Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always an Update #53

Open
SamyBencherif opened this issue Nov 28, 2018 · 13 comments
Open

Always an Update #53

SamyBencherif opened this issue Nov 28, 2018 · 13 comments

Comments

@SamyBencherif
Copy link

SamyBencherif commented Nov 28, 2018

Ptop asks me to update every time I run it.

samy-mbp-5:~ samybencherif$ ptop
A new version is available, would you like to update (Y/N) ? Y

Creating a temporary directory /tmp/FVZWD0INN0 ...
Cloning into '/tmp/FVZWD0INN0'...
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 784 (delta 43), reused 65 (delta 26), pack-reused 696
Receiving objects: 100% (784/784), 9.35 MiB | 1.16 MiB/s, done.
Resolving deltas: 100% (374/374), done.

Installing ptop ...
[ ... ]
Using /Library/Python/2.7/site-packages
Finished processing dependencies for ptop==1.1

samy-mbp-5:~ samybencherif$ ptop
A new version is available, would you like to update (Y/N) ?

However after running the update, I am in fact not updated.

samy-mbp-5:~ samybencherif$ ptop -v
ptop 1.0

For anyone else experiencing this issue it can be temporarily patched by disabling the updater altogether.

curl -L https://bit.ly/2KBDt9y | python3 -
^ run at your own discretion

@darxtrix
Copy link
Owner

@SamyBencherif thanks for the info. Are you running it on Mac OS X ? Sadly, I did not get a macbook to test the auto-upgrade behaviour. Can you attach more details why the installation is failing on the first place during an auto upgrade, send the logs at ~/.ptop.logs so that i can take a look.

@SamyBencherif
Copy link
Author

SamyBencherif commented Nov 28, 2018

Yes I am running on mac. Here is ptop.log.
Please let me know if I can be of more assistance.

@darxtrix
Copy link
Owner

darxtrix commented Nov 28, 2018

I guess I got the issue. Your system python version is 3.6 and your pip version points to the one with python 2.7 which is inferred by

Installing ptop ...
[ ... ]
Using /Library/Python/2.7/site-packages
Finished processing dependencies for ptop==1.1

If you can fix pip to point to the one with Python 3.6, ptop will be able to upgrade.

Moreover do one more thing if its possible for you,

$ cd /tmp/FVZWD0INN0
$ sudo python setup.py install

and send me the logs.

Thanks !

@SamyBencherif
Copy link
Author

It looks like the inverse situation to me.

samy-mbp-5:~ samybencherif$ pip --version
pip 18.1 from [...] (python 3.6)
samy-mbp-5:~ samybencherif$ python --version
Python 2.7.10

Should I change pip back to Python2?

Running the following appears to have successfully updated ptop.

$ cd /tmp/FVZWD0INN0
$ sudo python3 setup.py install

Here is the new ptop.log.

@darxtrix
Copy link
Owner

Ah,my bad. pip should ideally point to system Python. Anyways, thanks for the help. I will keep this open for sometime to check if it is happening to other people as well running mac os x.

@magicpotion
Copy link

it happens to me, on ubuntu 16

$ pip --version
pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
$ python --version
Python 2.7.12

@darxtrix
Copy link
Owner

hi @magicpotion, can you please post the logs here for the upgrade operation.

@magicpotion
Copy link

A new version is available, would you like to update (Y/N) ? Y

Creating a temporary directory /tmp/0IYJ9YTU3X ...
Cloning into '/tmp/0IYJ9YTU3X'...
[...]
Installing ptop ...
[...]
installing package data to build/bdist.linux-x86_64/egg
running install_data
warning: install_data: setup script did not provide a directory for 'VERSION' -- installing right in 'build/bdist.linux-x86_64/egg'

copying VERSION -> build/bdist.linux-x86_64/egg
warning: install_data: setup script did not provide a directory for 'README.md' -- installing right in 'build/bdist.linux-x86_64/egg'

copying README.md -> build/bdist.linux-x86_64/egg
warning: install_data: setup script did not provide a directory for 'CONTRIBUTORS.md' -- installing right in 'build/bdist.linux-x86_64/egg'

copying CONTRIBUTORS.md -> build/bdist.linux-x86_64/egg
warning: install_data: setup script did not provide a directory for 'LICENSE' -- installing right in 'build/bdist.linux-x86_64/egg'

copying LICENSE -> build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying ptop.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ptop.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ptop.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ptop.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ptop.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ptop.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
ptop.__init__: module references __file__
ptop.statistics.statistics: module references __file__
creating dist
creating 'dist/ptop-1.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing ptop-1.1-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/ptop-1.1-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/ptop-1.1-py2.7.egg
Extracting ptop-1.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
ptop 1.1 is already the active version in easy-install.pth
Installing ptop script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/ptop-1.1-py2.7.egg
Processing dependencies for ptop==1.1
Searching for huepy==0.9.8.1
Best match: huepy 0.9.8.1
Adding huepy 0.9.8.1 to easy-install.pth file
[...]
Using /home/chris/.local/lib/python2.7/site-packages
Searching for idna==2.7
Best match: idna 2.7
Adding idna 2.7 to easy-install.pth file

Using /home/chris/.local/lib/python2.7/site-packages
Finished processing dependencies for ptop==1.1

@darxtrix
Copy link
Owner

darxtrix commented Nov 30, 2018

Thanks for adding this. Can you send me these also:
$ which ptop
$ ptop -v
$ which python
and the contents in the file ~/.ptop.log

@magicpotion
Copy link

$ which ptop
/home/chris/.local/bin/ptop
$ ptop -v
Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
ptop 1.0
$ which python
/usr/bin/python

nothing interesting in logs

@darxtrix
Copy link
Owner

darxtrix commented Nov 30, 2018

Okay, the new version of ptop should be there at /usr/bin or /usr/local/bin. You have all the site-packages installed at .local instead of the global library path and you are using the local ptop binary at .local/bin/ptop. Currently its updated at the system wide level only. You can create a bash alias to refer to the global ptop.

@magicpotion
Copy link

thanks
it's the default pip install mode, please include --system in docs
also what about installing ptop in virtual env?

@darxtrix
Copy link
Owner

darxtrix commented Nov 30, 2018

It works in virtualenv, i have tested it there. You can activate virtualenv and do a pip install. I don't about the usage of --system flag, can you elaborate ?

For me pip install at system level. Version of pip is 18.0 and there is no such flag. I see you are using 8.0 version of pip, it being outdated might be the problem here or it might have something to do with python2. You can try upgrading pip and installing. Let me know if the problem persists. Thanks !

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

No branches or pull requests

3 participants