How to install python3 without admin rights on Windows? - python-3.x

I want to install python3 on a computer that I do not have admin rights. Are there any ways to go around ? Thanks.

You could try python virtual environments, which is probably good practice even if you have admin rights. Here is a good guide to python virtual environments: http://docs.python-guide.org/en/latest/dev/virtualenvs/

You can try downloading the .zip from the python website https://www.python.org/downloads/release/python-371/ under files.
Although you won't find IDLE as a part of this python by default. You can use any other IDE or just cmd.

Download msi file for particular version and mention the target directory name and run below command in Download folder(where msi placed)
msiexec /a python-2.7.10.msi /qb TARGETDIR=D:\python27
inside D:\python27 we got python path and application

Related

command prompt when i try install any dependence

when I try to install any dependence in command prompt get this error message and tried to google but nothing any one to help me please
please I need help someone to help me
try installing locally. and add this path to your system variable: C:\Program Files\nodejs
Reinstall the node.
You have two ways to install Node.js on your computer.
Option 1 – Setup by running the .msi installation file
Its a typical Windows installation and automated. No need to add
entries in environment varaiable
Option 2 – Setup by extracting .zip file
This method does not require admin access and can be used to install
on nodejs on a system on which you dont have admin access such as you
official laptop or desktop.
Removing nodejs is as simple as deleting the folder. You will have
to add entries in environment variable if you want to execute node
command from any location in windows command prompt. https://nodejs.org/en/download/
Based on the screenshot.your access is denied.Would suggest starting the terminal as an administrator before running the command.

Using Wine in Heroku

Can anybody help me figure out how do I use Wine in Heroku?
I deployed Wine to Heroku with the button in the readme of https://github.com/TheBotlyNoob/heroku-buildpack-wine.
But when I tried to run Wine like this:
It didn't work. Am I trying to run Wine wrong? Or is there another step I need to do?
Thanks.
I've installed both versions of wine (stable and release) but when I try to execute the command on the bash the shell answer that the file doesn't exist:
bash: /app/vendor/wine/bin/wine: No such file or directory
Heroku bash: wine not such file
Even if wine is installed and the file is executable:
wine
If you try to launch notepad the answer of the bash is the same:
/app/vendor/wine/bin/notepad: 46: exec: /app/vendor/wine/bin/wine: not found
even if wine is in the PATH.
Conclusion: wine doesn't execute.
A way to have wine on Heroku is to download the package from ubuntu with his dependencies, put them in the repository and install it.
Hope it was useful.

Mac zsh: django-admin command not found

I have zsh on my mac. I did simlink as you recommended in here django-admin command not working in Mac OS so in my directory /usr/local/bin I have another folder bin with files __pycache__ django-admin.py.
However there is still the same problem and I receive zsh: command not found for django-admin as well as django-admin.py
Any alternative guys? I am pretty new into programming and computer science :(
Python 3.8 Django 2.1
before going any further in your discovery of Python and Django, you should take a moment to learn about virtual environment in Python.
Virtual env are highly recommended when working with Python. Among many other advantages, they simplify the access to installed packages, or command line utilities like django-admin.
I picked a tutorial that looks ok but there are plenty of them on the web : https://realpython.com/python-virtual-environments-a-primer/
Good luck in your pydventure ;)

'python3' is not recognized as an internal or external command, operable program or batch file

I am using Python 3.5.2 version on Windows 7 and tried using python3 app.py. I am getting this error message:
'python3' is not recognized as an internal or external command,
operable program or batch file.
Is there any specific cause about why the python3 command is not working?
I also verified that the PATH is added to environment variables.
There is no python3.exe file, that is why it fails.
Try:
py
instead.
py is just a launcher for python.exe. If you have more than one python versions installed on your machine (2.x, 3.x) you can specify what version of python to launch by
py -2 or
py -3
You can also try this:
Go to the path where Python is installed in your system. For me it was something like C:\Users\\Local Settings\Application Data\Programs\Python\Python37
In this folder, you'll find a python executable. Just create a duplicate and rename it to python3. Works every time.
Python3.exe is not defined in windows
Specify the path for required version of python when you need to used it by creating virtual environment for your project
Python 3
virtualenv --python=C:\PATH_TO_PYTHON\python.exe environment
Python2
virtualenv --python=C:\PATH_TO_PYTHON\python.exe environment
then activate the environment using
.\environment\Scripts\activate.ps1
Yes, I think for Windows users you need to change all the python3 calls to python to solve your original error. This change will run the Python version set in your current environment. If you need to keep this call as it is (aka python3) because you are working in cross-platform or for any other reason, then a work around is to create a soft link. To create it, go to the folder that contains the Python executable and create the link. For example, this worked in my case in Windows 10 using mklink:
cd C:\Python3
mklink python3.exe python.exe
Use a (soft) symbolic link in Linux:
cd /usr/bin/python3
ln -s python.exe python3.exe
In my case I have a git hook on commit, specified by admin. So it was not very convenient for me to change the script (with python3 calls).
And the simplest workaround was just to copy python.exe to python3.exe.
Now I could launch both python and python3.
If python2 is not installed on your computer, you can try with just python instead of python3
For Python 27
virtualenv -p C:\Python27\python.exe django_concurrent_env
For Pyton36
virtualenv -p C:\Python36\python.exe django_concurrent_env
Enter the command to start up the server in that directory:
py -3.7 -m http.server
I had a related issue after installing windows 11, where python3 in cmd would open the windows store. I was able to sort it out between this post and this other one. In short, I reinstalled python and made sure to add it to PATH. Then, in settings, Apps > Apps & Features > App Execution aliases. Here, all I had to do was make sure that every single python .exe (including idle and pip) were turned off EXCEPT FOR the python3.exe alias. Now it works like a charm.
FWIW:
The root of this issue is not with you or with python. Apparently, Microsoft wanted to make installing python easier for young kiddos getting interested in coding, so they automatically add an executable to PATH. For those of us that already have this executable, it can cause these issues.
Found out instead press the play button the top right and it should work in visual studios:
Do not disable according to first answer
Saying python3 in the command will not work by default.
After figuring out the problem with the modules (Solution): https://youtu.be/paRXeLurjE4
Summary:
To import python modules in case of problem to import modules:
Hover over python in search:
Click open in folder
Hover over and right click
click properties
copy everything in path before \python.exe
close those windows
For cmd (administrator):
cd --path that was copied--
then python -m pip install --upgrade pip
cd Scripts
pip install "Name of Package" such as pip install --module (package) --
Im on win10 and have 3.7, 3.8 and 3.10 installed.
For me "python" launches version 3.10 and does not accept commands (like -3.7), "py" launches newest version but does accept commands, and "python3" does nothing.
Uninstalled 3.10 and "python" now does nothing, and "py" launches 3.8.
I am unable to add a comment, but the mlink option presented in this answer above https://stackoverflow.com/a/55229666/8441472 by #Stanislav preserves cross-platform shebangs at the top of scripts (#!/usr/bin/env python3) and launches the right python.
(Even if you install python from python.org, Windows will direct you to the app marketplace nowadays if you type python3 on the command line. If you type python on the same cli it will launch the python.org version repl. It leads to scripts that generate no output, but more likely silently failed completely. I don't know ho common this is but have experienced it on a couple of different devices)
If you have this at the top of your script to ensure you launch python3 and don't feel like editing everything you own, it is not a bad approach at all... lol.

Xampp on linux mint

im trying to install xampp on "new" linux mint machine.
However im quite a noob to linux since i havnt used it for that long.
When i try to run the file that ive download from the following page:
Xampp download
i get the following error two errors:
Could not display "/home/marc/Downloads/xampp-linux-x64-1.8.3-0-installer.run".
and if i click yes
Installing mime type handlers isn't supported
To search and install software which can open certain file types you have to install app-install-data.
can anyone tell me what the problem is and how i might fix it?
you need to execute the file (e.g. open a terminal, navigate to your Downloads folder and run bash xampp-linux-x64-1.8.3-0-installer.run (possibly it might need to be run otherwise, but thats my best guess)).
alternatively you might be presented to run/execute the file (instead of displaying it). if so, choose this option.
on the other hand, you might consider installing apache/php/mysql via your package manager.
what you can do is that you can use the chmod +x /your folder location/.run file that you want to install
after that you can run following command
./and your .run file name
example:-
in my case :- User#user~$su root
it will ask for password so give it
User#user~chmod +x /Downloads/xampp-linux-x64-1.8.3-0-installer.run
User#user~./xampp-linux-x64-1.8.3-0-installer.run

Resources