Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need to run a Python script on a remote Linux machine. The problem is that Python isn't installed on that machine. As a newbie in Linux greedily taking advantage of the user friendly tools Ubuntu offers, I have no clue how to install it without a packet manager (God bless apt-get!). I don't even know if the OS running on the remote machine is Debian based, but I do know that it doesn't have apt-get installed.
I connect to it using SSH, have root rights, want to run my scripts on it continuously.
Please help me!
Thanks in advance!
as a normal user run the following commands:
wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
tar xzf Python-2.7.tgz
cd Python-2.7
./configure --with-pth --with-dec-threads --with-signal-module --prefix=/opt/python-2.7
make
then as root do (becoming root using sudo or su):
make install
A brief explanation:
wget downloads the python sources, you can install another version if you like, maybe python 3.x
tar uncompress the downloaded file
configure checks if all required dependances are available and configures the source code for your own system
make starts the compiling/linking process
make install copy the compiled file in the right place
after that maybe you need to make a symbolic link to your python executable or to your python folders, it depends on you
references:
- the installations commands have been copy-pasted from this website after a rapid google search, so maybe you need different config options
- the official info are here
note:
I this question should be better placed on superuser.com (the reason is that may be more relevant for computer enthusiasts & power users rather than for programmers, since it is not a programming issue but a software installation issue)
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Imagine having to write python code to be submitted to a remote Ubuntu box to be run there (you do not get to touch the terminal, you do not get to install anything or run apt to query what's installed). How would you go about figuring out what python packages are likely available on that machine by default (i.e. what does a complete Ubuntu install include, not what can I download and install later). I'm having the hardest time finding something like a "list of all packages installed by default" or some such thing. Is there such a thing? Or do I have to download an image and actually install it just to find out what's in the box?
Go to http://releases.ubuntu.com/ and select the specific version of Ubuntu. Then download the ".manifest" file (there can be more than one, e.g. desktop and server). For example here is one recent file:
http://releases.ubuntu.com/20.04.1/ubuntu-20.04.1-live-server-amd64.manifest
Grep that for "python" and you'll see most of the relevant parts. Some selected highlights from the above link:
python3 3.8.2-0ubuntu2
python3-automat 0.8.0-1ubuntu1
python3-blinker 1.4+dfsg1-0.3ubuntu1
python3-colorama 0.4.3-1build1
python3-configobj 5.0.6-4
python3-dbus 1.2.16-1build1
python3-idna 2.8-1
python3-jinja2 2.10.1-2
python3-jsonschema 3.2.0-0ubuntu2
python3-more-itertools 4.2.0-1build1
python3-oauthlib 3.1.0-1ubuntu2
python3-requests 2.22.0-2ubuntu1
python3-simplejson 3.16.0-2ubuntu2
python3-six 1.14.0-2
python3-twisted 18.9.0-11
python3-urllib3 1.25.8-2
python3-yaml 5.3.1-1
python3-zope.interface 4.7.1-1
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have created a selenium automation code and I wanna share it with my friends, I want to make it fully automated, so I made a setup.py file that will automatically install all pip requirements.
I want to make something like a .bat file which will install python in windows by just double-clicking on it.
Is it even possible?
Thanks :)
Update: The possible solution that I found
I was unable to find a way to Download python using just CMD but if you have python.exe in your system then you can use the below Method to install it (you can also make .bat file to automate it.)
Install the python.exe file on your computer from the official site.
Open CMD and change Your directory to the path where you have python.exe
Past this code in your Command prompt make sure to change the name with your file version In the below code(e.g python-3.8.5.exe)
python-3.6.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
It will also set the path Variables.
If you have cURL, you can use that from cmd:
curl https://www.python.org/ftp/python/3.8.5/python-3.8.5.exe --output "%TMP%\python-3.8.5.exe" && "%TMP%\python-3.8.5.exe" /silent
It should download and install Python 3.8.5 x86
I don't know if you can install python using command line in Windows.
But maybe you can "bundle" your entire application (including python itself) using pyinstaller:
https://www.infoworld.com/article/3543792/how-to-use-pyinstaller-to-create-python-executables.html
This way you can send your entire application as a executable (*.exe) file.
Another option is to download portable-python:
https://sourceforge.net/projects/portable-python/
And your friends can use wget from windows command line to download portable-python.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I need to use streamparse on a CentOS machine that does not have internet access, meaning I cannot use pip. The only net-enabled services I can use are scp and ssh. My plan is to get streamparse on my local machine (Ubuntu) and then scp the streamparse files to the CentOS machine and manually install from there.
Any ideas on how to do this?
edit:
since this is "on hold as off-topic," I'll explain why it just might be considered "on topic" by addressing the 4 "on topic" bullet points from the community help page (https://stackoverflow.com/help/on-topic).
a specific programming problem: installation is a kind of programming problem, especially when you have to write (program, verb) shell scripts (program, noun) to accomplish the installation of software that leads to more programming.
a software algorithm: I am looking for a sequence of steps (aka an algorithm) to install something within specified technical constraints.
software tools commonly used by programmers: the thing I am trying to
install is a software tool. It is called streamparse. It is used by programmers.
a practical, answerable problem that is unique to software development: I was not asking this question for theoretical reasons--hence it is practical, and I believe installing things by getting around firewalls is unique to software development. I'll concede that this could be viewed not as "software development" but rather "devops" but those two things are merging so throw me a bone here.
Once you have the lib files on the CentOS box you can use pip to install by passing the -e (editable) flag:
$ pip install -e path/to/SomeProject
Here's a link to pipy's #editable-installs section
Thanks, #dougdragon. I also got pointed to the solution below. I'll leave yours as the accepted answer since you got it first.
$ wget https://pypi.python.org/packages/8d/f8/9ccde77a90a30ef491bee431f157aee38dbd93b5f3c7545779a0acee71db/streamparse-3.0.1.tar.gz
$ tar -zxvf streamparse-3.0.1.tar.gz
$ python streamparse-3.0.1/setup.py develop
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Having read several resources (eg this one) on installing wxpython on Ubuntu 12.04, I muddled it all. My terminal outputs a single error upon writing, for instance, a statement sudo apt-get install python-wxgtk2.8, which is required for the proper installation of the GUI. Namely, it displays " E: The package wxpython needs to be reinstalled, but I can't find an archive for it.
I scanned all the folders that contain files connected with wxpython in order to delete them and reinstall the package. Anyway, it didn't work.
Could you please tell me what steps can be applied to resolve the problem?
This happens when the package list is not up to date.
1) First you have to update package archive list by running following command;
sudo apt-get update
2) Once package archive list updated, run following command;
sudo apt-get install python-wxgtk2.8
Further reading # Ubuntu Package Management from Command line using apt
** However, if you have mistakenly removed/disabled “apt” repositories, it would be easier to use GUI based repository management tool to reconfigure “Software sources”.
Have a look # GUI-based repository management
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a site, built on Django/Python, which I need to profile. It's running on Ubuntu server with Apache, and I want to launch it on my local computer, under Windows on Django-dev-server.
The problem is that the site requires specific (outdated) versions of libraries, otherwise I will need to do many time wasting things to get it running (like migrations, dealing with changes of API in modules, etc).
So I basically need to build a version of Python interpreter on Windows, which will correspond to the version running on the Linux server - with all version of modules matching.
If there are no solutions for Windows, Linux also would be OK.
Kindly help!
Why not just run Linux as a VM in VirtualBox? If there is a requirements.txt file, it shouldn't be difficult to get running using pip to install modules, unless the versions of those modules aren't available anymore.
If the project is so old that the necessary modules aren't available, you're probably better off writing new code with updated modules.
You can create the test lab as follows.
The version of libraries and OS in virtual machine on windows or linux.
For the version of python you can use a virtual environment.
The easiest way to configure a custom Python environment is to setup a
"virtual environment" for Python using virtualenv. Virtualenv allows
you to add and modify Python modules without access to the global
installation.
wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.5.2.tar.gz
tar xzf virtualenv-1.5.2.tar.gz
python virtualenv-1.5.2/virtualenv.py $HOME/env
or
python virtualenv-1.5.2/virtualenv.py --no-site-packages --distribute $HOME/env