Mac zsh: django-admin command not found - python-3.x

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 ;)

Related

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.

sdkman appears to be installed but not showing up on my drive

I have started learning groovy and I just came across the SDKMAN utility.
To give it a try I folllowed the installation guidelines at the official site of sdkman and tried to run the below command to install sdkman on Windows 10 :
set SDKMAN_DIR="E:/sdkman" && curl -s "https://get.sdkman.io" | bash
But I donot see any sdkman folder present in my E drive.
When I try to re-run the command it says :
Looking for a previous installation of SDKMAN...
SDKMAN found.
======================================================================================================
You already have SDKMAN installed.
SDKMAN was found at:
"E:/sdkman"
I am just confused as to why am I not able to see it with my eyes. I have even tried enabling view hidden items.
Tried to execute which sdk. but it clearly says which: no sdk in (..
...
has anyone else experienced similar issue. Any help is highly appreciated.
which bash implementation are you using under windows? cygwin? gitbash?
I believe at least in gitbash that the path syntax is /e/sdkman/, i.e. you would do:
export SDKMAN_DIR="/e/sdkman" && curl -s "https://get.sdkman.io" | bash
but it's been a long time since I was on windows and I suspect this is bash-implementation specific (i.e. it might differ between cygwin and gitbash for example).
If this assumption is correct, the syntax you were using might have created a directory called E:/sdkman under your user's home directory or whatever directory you happened to be in when you ran this. Just guessing here, but worth a look.

Specify Python3 to Atom on Windows 10

In advance, sorry if this is question ought be on SuperUser or another site
The python3 shebang doesn't seem to work on win10. (I cant check right now, but I believe the analogous approach worked on MacOS for me last night). Consider the following
#!/usr/bin/env python3
print("hello world")
Leads to the error 'python' is not recognized as an internal or external command,
operable program or batch file. This makes sense because I only have a python3 distro on my machine (which can only be called like python3). However, Atom seems to be ignoring the shebang altogether. FYI, I'm running the script with the popular "script" atom package.
I've tried the permutation, #!/usr/bin python3, but this doesn't work either.
I've tried permutations
I'm still interested in how shebangs work within the Atom environment, but as far as getting python3 up and running, you dont need a shebang. You can simply change a config file (python.coffee) from within Atom, then relaunch. See Daniel Chamorro's excellent answer here: How to setup Atom's script to run Python 3.x scripts? May the combination with Windows 7 Pro x64 be the issue?

Can't run NodeSchool workshops in Git Bash. "TypeError: process.stdin.setRawMode is not a function"

From the research I did for the topic, I saw some recommendations to install tty.js with npm, but it wouldn't install as well - some sort of python exe missing from the system error.
I am able to run the program from Git CMD but it is all confusing for me because I am familiar with unix based consoles :(
The way I installed node.js and npm : All was doen with the installer provided by node.js.
Any insights? Thank you in advance!
I have installed tty.js in a linux enviroment and it works great, you should some building essentials installed, such as:
gcc
g++
make
As well as Python 2.7. When installing using npm, it will look for all the dependencies and as I understand it will compile some C code that does the magic behind the scenes. I haven't tried it on Windows, but what I have seen there is the C code designed for windows, so it probably will run.
Maybe I will be of more help if you copy what you get on the npm installation.
have you tried using Git Bash? That is what I used for the most part as well and acts more unix like. If you're on a PC, an alternative is using ConEMU as they give you a shell that is unix like. Just wanted to give you some options if you're still running into trouble, I know this is super late :)

Installing Python2.7 on a linux server without root privileges

I am trying to install python2.7 over given python2.6 on a web server. I am stuck at the last step trying to link new python install over the old one.
The steps I have done:
Downloaded and extracted Python 2.7
configured with --prefix=$HOME/.local
make install
What I don't get is how to link by making changes in .bashrc (and what changes to make). I looked over all the places but most the answers are not generic.
Also, I have to install couple of other lovely python stuff, like pip virtualenv, django, nltk over this. A little help on that would be too great.
Ok, without root privileges you will have to have all the python stuff and your code in your home folder. And also you won't be able to configure your nginx/apache/whatever http server you use. Does not seem like a good idea for production, but for development - sure, why not.
This means you will need to install python in your home folder. You can download and compile, but probably the simplest way to do so is pyenv - https://github.com/yyuu/pyenv. Some reading is required to understand its concepts, but it is much simpler than fiddling with manual compiling if you are not sure what you're doing.
Also it kinda replaces virtualenv, but you can still have it if you want. And of course, it all works with your non-root user. There is an installer that doesn't require root either.

Resources