I went on the cmdl and pip install cookiecutter
This worked fine because when i do
pip show -f cookiecutter
I have the information of where it was saved(i.e: c:\users\name\appdata\roaming\python\python39\site-packages
But when I try to run the following command in the folder I want my template to be created in
cookiecutter -c v1 https://github.com/drivendata/cookiecutter-data-science
This error message is displayed:
'cookiecutter' is not recognized as an internal or external command,
operable program or batch file.
After reviewing countless other similar posts, I think this might have to do with the virtual environment or path that is active but I have no idea what that means and how to make changes in my system.
To use cookiecutter, type "python" in the Windows search bar. Your current python version should show up. In the window that pops-up, click "open file location". Right click the python shortcut icon and click "open file location" again. Look for the "Scripts" folder and double click it. If you installed cookiecutter correctly, you should see it in the "Scripts" folder.
Copy the file path and open up "System Properties". In "System Properties", click on "Environment Variables", then open up "PATH" and add the link you just copied to path. Click "OK" to all and restart the command prompt. Using the command prompt, go to the folder where you want to set up the project in your local system and run the following:
cookiecutter -c v1 https://github.com/drivendata/cookiecutter-data-science
If it works, it should ask you for project name, author name etc.
Related
When I run the following command on windows visual code terminal to test my code
brownie run scripts/file.py --network kovan
I get this error
"SolcInstallationError: Downloaded binary would not execute, or returned unexpected output."
Also some errors referring to files for running the installation but so far my trouble shooting has led me to uninstall brownie then install with pipx and initialized a package.json and ran
npm install -g solc
and i still get that error whenever I run the script
Install Solc on Windows
Download the Windows binary from
https://github.com/ethereum/solidity/releases
Put the solc-windows.exe into a new folder
Rename solc-windows.exe to solc.exe
Launch a command prompt and cd into the directory where solc.exe was
extracted to
First check the version
solc --version
In your case I recommend adding it to you PATH variable:
Click Start and type system. From the search results select System
(Control Panel)
Start System
From the System window on the left click Advanced system settings
On the Advanced tab click Environmental variables
Under User variables for… select Path and click Edit
Add the path to your solc installation, then click OK, OK, and OK to
save. Close and reopen any command prompts for the change to be
reflected.
Credits: https://www.codeooze.com/blockchain/solc-hello-world/
'django-admin' is not recognized as an internal or external command,
operable program or batch file... So I am getting this error in terminal. I am trying to build an app. First I opened a folder(page) in my computer D drive and then opened Visual Studio Code. From there I opened the folder(page) and from view I opened terminal. Then when I am trying to type django-admin myproject page. it is showing this error.
As you are using conda environment, use conda activate to activate the environment, and then you can use the Django module.
This error is occurring due to the missing Django module.
If you're using a virtual environment, do you have it activated?
Is you you python scripts folder in PATH?
On windows: Search for 'Edit the system environment variables'.
Click on 'Environment Variables...'
In System Variables look for row with variable name Path. Click on it and then Edit.
You'll see a number of directories. Do you see one ending with something like ..\Python\Python39\Scripts?
If you have that folder open it and make sure you have django-admin.exe inside.
correction
i edited the environment variable to path Scripts, but in the command prompt on typing the pip command it does not shows up the package installation
python\scripts location picture
While executing the pip command in the command prompt, it shows pip is not recognized as an internal or external command, operable program or batch file.
I tried setting environment variables and all other alternative solution still I am not able to solve it. I recently noticed pip.exe file missing from python/scripts module.
Is that reason to show up this error? if it is yes, how will I install it manually?
You should add the full directory to the Scripts folder to your PATH environment variable. When you run commands in a command prompt, Windows will search through the folders listed in PATH.
Assuming you are on Windows 10:
Press the start button then search "Environment Variables"
Click the "Edit Environment Variables" option.
Click the "Environment Variables" button in the box that pops up.
Scroll down and find the PATH variable, double click it.
Click "New"
Paste in the path to the Scripts folder.
Save it and exit, then restart the terminal. Now pip will be recognized.
Finally I solved it.I used python 3.8.3 version.Not folder named "Scripts" in this version.I just delete this version and reinstall python 3.7.8 version and then pip is here :D
I know this has been solved, but another way of dealing with this is to create an empty file in the 'Scripts' folder and rename it to pip.bat. Then add the following code:
python -m pip %*
Which simply passes all the arguments of the pip command to python.
When I double-click on pycharm.sh, Ubuntu lets me choose between "Run in Terminal" and "Run". What is the difference between these options?
To make it a bit more user-friendly:
After you've unpacked it, go into the directory, and run bin/pycharm.sh.
Once it opens, it either offers you to create a desktop entry, or if it doesn't, you can ask it to do so by going to the Tools menu and selecting Create Desktop Entry...
Then close PyCharm, and in the future you can just click on the created menu entry. (or copy it onto your Desktop)
To answer the specifics between Run and Run in Terminal: It's essentially the same, but "Run in Terminal" actually opens a terminal window first and shows you console output of the program. Chances are you don't want that :)
(Unless you are trying to debug an application, you usually do not need to see the output of it.)
The question is already answered, Updating answer to add the PyCharm bin directory to $PATH var, so that pycharm editor can be opened from anywhere(path) in terminal.
Edit the bashrc file,
nano .bashrc
Add following line at the end of bashrc file
export PATH="<path-to-unpacked-pycharm-installation-directory>/bin:$PATH"
Now you can open pycharm from anywhere in terminal
pycharm.sh
For Pycharm CE 2018.3 and Ubuntu 18.04 with snap installation:
env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop /snap/bin/pycharm-community %f
I get this command from KDE desktop launch icon.
Sorry for the language but I am a Spanish developer so I have my system in Spanish.
As mentioned in the above answer, by updating the bashrc file you can run the pycharm.sh from anywhere on the linux terminal.
But if you love the icon and wants the Desktop shortcuts for the Pycharm on Ubuntu OS then follow the Below steps,
Quick way to create Pycharm launcher.
1. Start Pycharm using the pycharm.sh cmd from anywhere on the terminal or start the pycharm.sh located under bin folder of the pycharm artifact.
2. Once the Pycharm application loads, navigate to tools menu and select “Create Desktop Entry..”
3. Check the box if you want the launcher for all users.
4. If you Check the box i.e “Create entry for all users”, you will be asked for your password.
5. A message should appear informing you that it was successful.
6. Now Restart Pycharm application and you will find Pycharm in Unity dash and Application launcher.."
First, go to that folder which is containing pycharm.sh and open terminal from there. Then type
./pycharm.sh
this will open pycharm.
bin folder contains pycharm.sh file.
You can launch PyCharm from terminal using pycharm-community or pycharm-professional if installed via snap. See here for more details: Location of PyCharm after install PyCharm as snap package
Yes just go to terminal
cd Downloads
ls
cd pycharm-community-2021.2.2 (your pycharm version)
ls
cd bin
ls
./pycharm.sh
It will open your continued pycharm project
I did the edit and added the PATH for my Pycharm in .bashrc but I was still getting the error "pycharm.sh: command not found".
After trying several other things the following command resolved the issue which creates a symbolic link.
sudo ln -s /snap/pycharm-community/267/bin/pycharm.sh /usr/local/bin/pycharm
The first is location to the exact path to pycharm.sh and the second is user bin which should be on PATH env by default
Official docs says if you have installed pycharm at this location: /opt/pycharm/bin/pycharm.sh then you can make it callable from terminal by using this command:
ln -s /opt/pycharm/bin/pycharm.sh /usr/local/bin/pycharm
I have Windows 7 (64-bit) operating system. I have installed python. I want to install setuptools (for python).
In their website (https://pypi.python.org/pypi/setuptools) it is written: "Download ez_setup.py and run it;"
I download that file, save it to my hard drive. Then when I click (right mouse button) and select "Open with"-> "python", a black console screen appears for a second, then disappears. And that's all.
What is wrong and how can I install that software?
Open a command prompt (Start menu -> cmd.exe)
Navigate to the directory where ez_setup.py is saved, e.g.:
cd C:\Users\You\Downloads
Run it (C:\Python27\ should already be on your %PATH%; if it's not, add it -- see below):
python ez_setup.py
Read the output. If it worked, you should be able to install packages like so:
C:\Python27\Scripts\easy_install jinja2
Add the path to easy_install to your %PATH% so that you can use it easily from any directory:
Control Panel -> System -> Advanced system settings
Click the Environment variables... button
Edit PATH and append ;C:\Python27\Scripts\ to the end (substitute your Python version)
Click OK. Note that changes to the PATH are only reflected in command prompts opened after the change took place.
If something goes wrong, the command prompt will remain open after the program finishes, so you'll be able to read the error and use it to resolve the problem.