2021-05-26 21:38:17

Hi, I'm wondering if anybody else has experienced this?
I am running ubuntu 18.04 as a server, and installed some programs with pip, which worked fine. As soon as I try to use pip to update them though, everything breaks, and I get many python errors. Uninstalling everything python and redoing it does work, but it's a bit of a pain.
Just wondering if anybody has a solution? Lots of the errors involve files not being found or permission denied, even with temp root access.

Prier practice and preparation prevents piss poor performance!

2021-05-26 21:46:39

You need to use virtualenvs.  Should be something like sudo apt install python3-virtualenv or something.  You can find lots of docs on this with Google.  It's probably breaking because both apt and pip want to manage Python packages, but installing srtuff into the global Python environment isn't a good idea at all.

Ideally you also use requirements.txt which, again, lots of docs via Google.

My Blog
Twitter: @ajhicks1992

2021-05-26 22:02:45

Hi, Thanks!
I'd heard of the requirements.txt and virtual environments a bit, I shall look more into it.

Prier practice and preparation prevents piss poor performance!

2021-05-26 22:29:42

Virtual environments are what you should use but you can also use --user when installing stuff and that'll put packages in your user directory. Then apt or whatever package manager can manage global python packages and it won't wine about user-installed packages via --user. You can also go really far and use pyenv to manage packages and python installations (but that may not give you access to system-wide packages).

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2021-05-26 22:58:17

So whenever you start a new project in python, you make a new directory in which you will contain everything. From within that top level directory, you do this.

python -m venv <directory>

I usually use `env' as my directory name but anything will work. Also the way you invoke python will determine what version of it is used when creating the environment. If your distro defaults to python 2 when you invoke python, it'll use that. In these cases, you'd want to invoke it by starting the command with python3. If your distro defaults to a version of python 3, then typing regular old python will creat the environment with python 3. You can type `python -V' to see what version is the default.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2021-05-27 05:23:52

Thank you for all the advice!
Another question, though. Does anybody know of a way I can either install ubuntu server accessibly, or completely automate the thing? I'm finding out lots of stuff isn't working after lots of not being used, so figure a reinstall and setitng things up fresh will help.
If this isn't possible with ubuntu, I'm also fine with other suggestions for a good server distro. This isn't something I know much of anything about, as it's been a while since I've given the one I use a thought at all.

Prier practice and preparation prevents piss poor performance!

2021-05-27 05:31:10

if your talking about installing server in a vm, in vmware you have easy install, but i don't think it's a good idea. better to take help or use ocr in case of vm. in case of installing as a primary os for your physical computer, better to take sighted assistance or use ocr with your phone or some thing.
and about accessible server distros, i don't think so. but we have accessible desktop distros. you can install one of those dekstop edition and use it as a server. but require more ram than what a server uses. even ubuntu desktop edition is accessible. i don't see isues in it.
ass soon as your on installation screen, press super+alt+s.
in normal keyboard, super key is windows key.

if you like this post, please thum it up!
if you like to see my projects, feel free to check out my github
if you want to contact me, you can do here by skype. or you can follow me on twitter: @bhanuponguru
discord: bhanu#7882

2021-05-27 06:54:02

Orca is built into their graphical installer; you need speakers and either windows+s or alt+s to turn it on.  If the server distro you're using doesn't have it, just do normal desktop Ubuntu and don't use the desktop part.  Server distros aren't special, they're just stripped down by default, and as I recall the Ubuntu installer will let you tell it not to install a desktop anyway.

I'd link you the docs on this but I don't have the link and it's incredibly hard to find via Google, plus all they really say is "wait for the installer then hit alt and/or windows plus s".  It's one of those, I just don't remember if it's alt or windows right now.

My Blog
Twitter: @ajhicks1992

2021-05-27 19:25:25

@8 awesome, thanks for the tip! I thought there might have been something along those lines but yeah, finding instructions is a pain in the ass.

Prier practice and preparation prevents piss poor performance!

2021-05-27 19:36:54

As a protip if you have vmware workstation, you can clone vms.  Get one working, save it somewhere, clone, use the cloned one.  Then can keep cloning from the base one and changing hostnames when you need new ones.  Other vm solutions have similar functionality, but Vmware player doesn't.

Don't use snapshots.  Snapshots are expensive and slow and will eat disk space like candy.

My Blog
Twitter: @ajhicks1992