Alternative install for python libraries? - python

I am working on a project in my school which requires me to install a couple python libraries. We have been blocked from using the CMD on the school computers which has proved problematic as this is the only way I know of which allows me to easily install any libraries. I also cannot see the location of the python install, I believe they are on some server which we do not have access too (although I am not confident in the matter). I believe each student is allocated space on the server so I can install some things from the internet (however quite a few things are blocked). Most of my class has overcome this by using their own laptops however this isn't an option for me. If needs be I can try install anything at home to bring into school on a memory stick. The school computers use windows 10 and python 3.6. If there's any more information you may need please say. Thank you in advance.

If you can install PyCharm then it has its terminal/cmd through you can install your python library. But important thing is that you must have permission to do it as you said you are on common server of the school.

Related

How do I install AMIL without python?

So I've really been trying to get into AI recently, but I can't install Python (windows education) and I don't have admin rights. Which is a problem.
I have the portable version of python, from the .zip, which means I can't use pip. That to, due to admin restrictions, I can't use windows terminal.
So I do I install AMIL without python, because I've been struggling to.
Also, something totally different, what other languages should I use for AI? If you could answer that I would really appreciate it.
Thanks :)

advice needed: jupyter dashboard, backwards compatibility and deployment

I (a scientist rather than software developer) have developed an application using jupyter dashboards and would like to make sure, colleagues (no programming skills) can use it in the future. However, jupyter dashboards are incompatible with the newest jupyter versions. We run windows on all of our desktop computers and cannot install software at will but have to use portable apps like anaconda python. For example, the anaconda navigator for example cannot modify the start entry after the installation because it requires admin rights. Furthermore, the firewall blocks conda update
I thought of two solutions:
1) the least complicated (for me)
Provide a .yaml file for the anaconda environment and a tutorial how to
install anaconda and activate the required environment. Problem: the firewall of the company does not allow anaconda to install packages. I can install it, log into my private wlan and cirumvent that but that is not an option for everyone. I would have to deploy somehow the specific anaconda environment offline. I do prefer this solution because it seems to be simpler and least error prone.
2) using docker
There are docker images available. We do have a local PC on which I could install docker and set up everything. Problem. If a new PC is installed, someone else would have to do all that, and honestly I doubt anyone would do that. We have an IT department but that is way out of the box and would require special attention and human ressource as well as a lot of mails and calls to the IT-service line
I would appreciate any advice or ideas how to make sure in the simplest way possible that my work can be used by other scientists with minimal effort.
Out of what you mentioned, I prefer docker approach. It allows you to define a well-controlled environment with a relatively easy setup for new users. Note that Docker has some quirks when running on windows and can sometimes cause weird issues (containers running out of space out of the blue, pathing issues [if running on docker toolbox]) and such.
It is slightly more complicated to setup (than yaml) but as a tradeoff you are much less dependant on every single machine's/network's specifications.
If your workplace has it department and if your team is supposed to share the work, i'd suggest to request them to create a cloud (intranet) jupyter server so your team could have centralized access to the jupyter infrastructure.
In my company we have an even more complex approach, an intranet copy of google colab. That would be the best approach if you can push your it dept this much.
Good luck!!

Small Mac-based post house looking to run a Windows box, but we rely on some Python scripts

You can tell where this is going from the title..
I work at a small post house, and to replace one of our older Mac Pros, we were looking at building a mid-range PC (doesn't need to do much heavy lifting - not worth the price of a new Mac Pro)..
The problem is, we have a number of scripts that we use for footage transcoding and media management, and they were coded for our Mac-exclusive environment..
The basic procedure for setting up a new workstation is:
Install pip using easy_install
Use pip to install:
youtube_dl
pexpect
parsedatetime
XlsxWriter
Install MacPorts.. Use MacPorts to install ffmpeg, lftp, and ImageMagick. From there, install a couple custom in-house scripts (that rely mostly on the preceding dependencies and python 2.7 (via xcode).
I'm NOT going to ask how to adapt this to PC, since that would be way outside the scope of a single question. My question is, without a strong python developer on-site (the custom scripts were written years ago by someone who's no longer with the company), is it even feasible to adapt the install scripts to a PC environment? We have a freelance Python developer that we consult for minor script changes and he wasn't sure (his response was "I would first double check to make sure some of the utilities can even run on windows. I’m not 100% sure they can or not"). Do any of the utilities jump out as something that would not be adaptable to a Windows environment?
Thanks very much in advance - I know it's a rather broad question.
If you "don't need heavy lifting", why upset your workflow this way?
If you are determined to buy a PC, why not run Linux on it rather than Windows? The setup process you described will be almost exactly the same on a Linux machine except for involving a different package manager instead of MacPorts.
Craig
PS the Python modules you listed are all available via MacPorts. It would simplify the software management process to install everything that way.

How to clean up my Python Installation for a fresh start

I'm developing on Snow Leopard and going through the various "how tos" to get the MySQLdb package installed and working (uphill battle). Things are a mess and I'd like to regain confidence with a fresh, clean, as close to factory install of Python 2.6.
What folders should I clean out?
What should I run?
What symbolic links should I destroy or create?
One thing you should not do is try to remove or change any of the Apple-supplied python files or links: they are in /usr/bin and /System/Library/Frameworks/Python.framework. These are part of OS X and managed by Apple. It is fine to clean up any unnecessary packages you have installed for that Python. They are in /Library/Python. If you installed a python.org Python and want to remove it, most of the files are in /Library/Frameworks/Python.framework. See here for complete instructions on how to remove them. And anything you installed into /usr/local is fair game.
Using virtualenvs is a fine idea but it's slightly less important on OS X where the concept of framework builds makes it easier to support multiple Python versions than on some other platforms.
The bigger issue, especially trying to use MySQL with Python, is getting all of the necessary non-Python libraries installed and built properly which is non-trivial given the variety of options available on OS X. For instance, depending on which Python instance and which OS X level running, you may need 32-bit or 64-bit or, possibly, both versions of things like the MySQL client libraries and the MySQLdb adapter. For that reason, I highly recommend using a complete solution from MacPorts. That way you have a good chance of getting all the right components built compatibly - and easily.
If necessary, install the base MacPorts as described on the MacPorts website then:
$ sudo port selfupdate
$ sudo port install py26-mysql
and that will pull in and build everything you need and make it available in /opt/local/bin. There are also plenty of other ports available, for instance:
$ sudo port install py26-virtualenv
Virtualenv might still work for you. Install it, then create virtual python environments with the --no-site-packages option. This won't clean up your base system, but should allow you to develop in pretty good isolation from the base system.
My experience doing development on MacOSX is that the directories for libraries and installation tools are just different enough to cause a lot of problems that you end up having to fix by hand. Eventually, your computer becomes a sketchy wasteland of files and folders duplicated all over the place in an effort to solve these problems. A lot of hand-tuned configuration files, too. The thought of getting my environment set up again from scratch gives me the chills.
Then, when it's time to deploy, you've got to do it over again in reverse (unless you're deploying to an XServe, which is unlikely).
Learn from my mistake: set up a Linux VM and do your development there. At least, run your development "server" there, even if you edit the code files on your Mac.
when doing an "port selfupdate", rsync timesout with rsync.macports.org. There are mirror sites available to use.

Miminal Linux For a Pylons Web App?

I am going to be building a Pylons-based web application. For this purpose, I'd like to build a minimal Linux platform, upon which I would then install the necessary packages such as Python and Pylons, and other necessary dependencies. The other reason to keep it minimal is because this machine will be virtual, probably over KVM, and will eventually be replicated in some cloud environment.
What would you use to do this? I am thinking of using Fedora 10's AOS iso, but would love to understand all my options.
I really like JeOS "Just enough OS" which is a minimal distribution of the Ubuntu Server Edition.
If you want to be able to remove all the cruft but still be using a ‘mainstream’ distro rather than one cut down to aim at tiny devices, look at Slackware. You can happily remove stuff as low-level as sysvinit, cron and so on, without collapsing into dependency hell. And nothing in it relies on Perl or Python, so you can easily remove them (and install whichever version of Python your app prefers to use).
For this purpose, I'd like to build a minimal Linux platform...
So Why not try to use ArchLinux www.archlinux.org?
Also you can use virtualenv with Pylons in it.
debootstrap is your friend.
Damn Small Linux? Slax?
If you want to go serious about the virtual appliance idea, take a look at the newly released VMware Studio. It was built exactly for trimming down a system (only Linux for now afaik) so it provides only enough base to run your application.
VMware is going (a bit more) open by pushing an open virtual appliance format (OVF) so, at some point in the future, you might be able to run the result on other virtualization platforms too.
Debootstrap, or use kickstart to strap your FC domains. However, other methods of strapping an RPM based distro exist, such as Steve Kemp's rinse utility that replaces rpmstrap.
Or, you could just grab something at jailtime to use as a base.
If that fails, download everything you need from source, build / install it with a /mydist prefix (including libc, etc) and test it via chroot.
I've been building templates for Xen for years .. its actually turned into a very fun hobby :)

Categories

Resources