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

Error Installing on Manjaro KDE #20

Closed
ghost opened this issue Aug 19, 2017 · 9 comments
Closed

Error Installing on Manjaro KDE #20

ghost opened this issue Aug 19, 2017 · 9 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Aug 19, 2017

pypia i gives me:

Traceback (most recent call last):
File "/usr/bin/pypia", line 11, in
load_entry_point('pypia==0.2.1', 'console_scripts', 'pypia')()
File "/usr/lib/python3.6/site-packages/pypia/pypia.py", line 301, in main
distro = Distro()
File "/usr/lib/python3.6/site-packages/pypia/pypia.py", line 54, in init
self.get_package_info()
File "/usr/lib/python3.6/site-packages/pypia/pypia.py", line 64, in get_package_info
with open('./pypia/package_info.json', 'r') as package_info:
FileNotFoundError: [Errno 2] No such file or directory: './pypia/package_info.json'

@ghost
Copy link
Author

ghost commented Aug 20, 2017

I went back to an older commit and installed it using python3 command and everything worked perfectly.

I tried everything with the new pip method but couldn't get anywhere with it.

I'm still not sure what the above problem means but perhaps it will help.

Thanks

@dagrha dagrha self-assigned this Aug 21, 2017
@dagrha
Copy link
Owner

dagrha commented Aug 21, 2017

thanks drhedberg for reporting this-- much appreciated! I will dig into it this week.

@dagrha
Copy link
Owner

dagrha commented Aug 21, 2017

@drhedberg, when you get a chance, could you tell me what you get when you run pip --version in a terminal?

@ghost
Copy link
Author

ghost commented Aug 21, 2017

Sure!

pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)

@dagrha dagrha added the bug label Aug 21, 2017
@dagrha
Copy link
Owner

dagrha commented Aug 21, 2017

@drhedberg, This should be fixed now. There was an issue with the package_info.json not being included with the pypi package because of a misconfiguration in setup.py. Thank you a ton for reporting this! I tested it in Manjaro KDE in a VM, and using pip install pypia and pypia -i (once it installed) the program worked fine. But I would be hugely appreciative if you would be willing to give it one more go on your machine to make sure it works. Cheers.

@ghost
Copy link
Author

ghost commented Aug 21, 2017

I would love to help. I installed it already with a previous commit through python3 command and everything is working fine now. What is the best way for me to do this? Do I need to uninstall something first and then try to reinstall? If so, I need some directions. Thanks

@dagrha
Copy link
Owner

dagrha commented Aug 21, 2017

All you would need to do is pip install pypia or possibly sudo pip install pypia depending on permissions of your python path. (At the risk of getting too into the weeds, if you are not comfortable sudo-ing a pip command, a better option would be a virtual environment. To do that, you'd do virtualenv venv, then source venv/bin/activate, then pip install pypia, assuming you have virtualenv installed).

Once that successfully installs, you can simply run pypia -i. The program will automatically overwrite the existing keyfiles and make sure any required dependencies are installed.

If for some reason it doesn't work for you, you can always go back to the method you used that was successful.

@ghost
Copy link
Author

ghost commented Aug 21, 2017

Ok, I got it working. pip install pypia gave:

Requirement already satisfied: pypia in /usr/lib/python3.6/site-packages

It looks like it was installed properly before.

pypia -i did not work so I did sudo pypia -i and that worked.

One of the confusing things is that on the instructions page, it doesn't say what directory to be in after we unzip the program. I just assumed I should be in pypia-master but there is another sub-directory pypia which was confusing.

I really appreciate you taking the time to fix this and provide instructions. And I really appreciate this program that you make available to everyone. It is a real pain to set up PIA manually with network manager because you have to do every single server individually. This program does all of that for us. Thank you!

@dagrha
Copy link
Owner

dagrha commented Aug 22, 2017

Of course, thank you so much for your feedback and filing this bug!

In order to overwrite your pypia package with the new version, you could do pip install -U pypia --no-cache-dir. The -U upgrades and the --no-cache-dir ensures you get the latest by forcing download from pypi rather than using a cached version.

I agree that it is a little confusing about how to install, given there's a pypia/pypia directory structure-- sorry about that! I will try to make the instructions a little more clear for those that do not want to use pip to install and would rather download from github and run it manually.

Ideally, a person can just simply install the package using pip and be off to the races with the pypia command, which you could run from any directory, since pypia gets added to your PATH.

I will close this for now but if you run into more issues feel free to reopen it or open a new issue. Cheers!

@dagrha dagrha closed this as completed Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant