Pipenv installed, but "doesn't exist" - windows

i'm trying to install pipenv on Windows 10 to use it with Docker, i've done the following steps on my Command Line:
pip install pipenv
(output)
pipenv
output (translation: "pipenv" is not recognized as an internal or external command, operable program or batch file)
So Windows tells me pipenv is not installed. How is it possible? How i can fix this? Thank you

The first thing you should do is add python to the window system variable. If you haven't done that, follow these steps:
Type "variable" to the search bar and select "Edit the system variable".
Click on the "environment variable..." button and you should see the list of variables that has been added by window.
Select the one containing the word "path" and click "edit".
Click the new and you can add the path to which you installed python.
For example:
My python is at
c:\python
Copy that and put into the edit box and click OK.
Lastly, click OK again and you should be good to go.
After you did that, you can do this to your command line:
python pipenv
Note: make sure you have pipenv installed by pip.

I had this same problem. Tried everything that has been recommended here and elsewhere.
Verified that Pip was in path
Python39 runs fine
PyCharm runs fine.
Finally, right clicked on Python in my list of programs in Windows10 and selected modify
Checked the various boxes during the modify dialog.
Pip now loads and works fine.

Related

Anaconda prompt not displaying (base) environment, displays path instead

I just did a more or less clean install of Miniconda3-latest-Windows-x86_64.exe. I selected the "All users" option to avoid admin rights problems with packages such as jupyter. The program was installed into C:\ProgramData\Anaconda3.
When I open the Anaconda prompt, conda returns the following output, however it doesn't recognize the base environment the way I would like it to, instead I get this on my prompt:
(C:\ProgramData\Anaconda3) C:\Users\aboufira>
When I really expect this:
(base) C:\Users\aboufira>
I find this problem to be quite annoying. Why does this occur? Have I installed into the wrong directory? How can I get it to display base like it should?
Delete your .condarc-file located at C:/Users/User and restart navigator again - worked for me :)

Can't get pip working with psychopy install

I am very new to python and plan to use psychopy quite a lot. I am on a work computer but have full admin rights.
Psychopy came with python version 2.7.11 and includes setuptools already.
I am trying to install the selenium module, but having trouble getting pip to work at all.
In cmd, it is recognising the 'python' command, so I know python is in my path.
I get the message "can't open file 'pip': [Errno2] No such file or directory" from:
python pip install selenium
I get " 'pip' is not recognised as an internal or external command" from:
pip install selenium
When I change directory to where pip is located, I get:
Fatal error in launcher: Unable to create process using '"'
Using pip2 makes no difference.
It seems a simple thing but where am I going wrong with this?!
I never really got to the bottom of this, but this is what I found out and here are the commands that worked for me in Windows. Be aware that I am far from expert!
To run python scripts (*.py) from command line (cmd) then C:\PsychoPy2 and C:\PsychoPy2\DLLs need to be in path. ('Path' contains directories or file extensions that can be more globally accessed, i.e. do not require you to change the prompt to the relevant directories first).
To check, open cmd and either type echo %PATH% or just type python. (If python starts, the line will say >>>. You can exit by typing quit())
To add to path, get properties of computer, then advanced system settings, then environment variables.
To check pip.exe (a sort of installation wizard) is installed, either search for the file, or check C:\PsychoPy2\Scripts for it. This may also need to be in path.
To reinstall the latest versions of pip and setup tools, I went to cmd and typed:
python -m pip install -U pip setuptools
If the same code did not work for other modules (which in my case was due to network access), then I downloaded the wheel file (*.whl) for that module (from their website) and ran the following code:
python -m pip install c:/modulename.whl
These may not be the correct ways of doing things, but they worked for me when I couldn't get other ways to work!
I've just had the exact same issue with the pip install, and a conflict with PsychoPy installations. I think it's because python automatically wants to call on the path that's been set by Psychopy, so it can't get to the 'pip' folders that for me, remain in a temporary/hidden file. This wasn't intuitive for me - on any machine without psychopy python just 'works' when you download it.

Git Bash giving sh.exe: ruby: command not found

I am using Git Bash on Windows Vista Business. I am trying to install Redmine. Basically on step 4, I need to get RubyGem installed before I install the bundler as part of the dependency install (http://www.redmine.org/projects/redmine/wiki/RedmineInstall). I downloaded rubygems-2.2.2.zip from https://rubygems.org/pages/download. Then I unzipped the file a folder on my desktop.
In Git Bash, I typed ruby setup.rb, I get sh.exe: ruby: command not found. Is it something related to the PATH environment? If so, how do I include it so that Git Bash will see the setup file and run it?
Ruby 1.9.3- p545 is already installed.
Thanks in advance.
If you already installed ruby, you have to include correct path.
Right click My Computer, click Properties, go to Advanced System Settings left navigation, click on Environment Variables... button, go to System Variables below, select Path, click Edit and in the beginning of the path enter: C:\Ruby200\bin; (Please note that in here you should indicate the ruby executable path. In case you installed ruby using Ruby installer for windows then the above mentioned path is correct).

git is not installed or not in the PATH

Windows, when I try to run npm install, it shows:
mean#1.0.0 postinstall E:\mean
node node_modules/grunt-cli/bin/grunt install
Running "bower:install" (bower) task
Fatal error : git is not installed or not in the PATH
npm ERR! weird error 1
npm ERR! not ok code 0
What is the problem? How to fix it?
The project git repository is https://github.com/linnovate/mean
Did you install Git correctly?
According to the Bower site, you need to make sure you check the option "Run Git from Windows Command Prompt".
I had this issue where Git was not found when I was trying to install Angular. I re-ran the installer for git and changed my setting and then it worked.
From the bower site:
http://bower.io/
while #vitocorleone is technically correct. If you have already installed, there is no need to reinstall. You just need to add it to your path. You will find yourself doing this for many of the tools for the mean stack so you should get used to doing it. You don't want to have to be in the folder that holds the executable to run it.
Control Panel --> System and Security --> System
click on Advanced System Settings on the left.
make sure you are on the advanced tab
click the Environment Variables button on the bottom
under system variables on the bottom find the Path variable
at the end of the line type (assuming this is where you installed it)
;C:\Program Files (x86)\git\cmd
click ok, ok, and ok to save
This essentially tells the OS.. if you don't find this executable in the folder I am typing in, look in Path to fide where it is.
Installing git and running npm install from git-bash worked for me. Make sure you are in the correct directory.
Install git and tortoise git for windows and make sure it is on your path, (the installer for Tortoise Git includes options for the command line tools and ensuring that it is on the path - select them).
You will need to close and re-open any existing command line sessions for the changes to take effect.
Then you should be able to run npm install successfully or move on to the next problem!
In my case the issue was not resolved because i did not restart my system. Please make sure you do restart your system.
If you installed GitHubDesktop then the path for git.exe will be ,
C:\Users\<'Username'>\AppData\Local\GitHubDesktop\app-1.1.1\resources\app\git\cmd
Add this path to the environment variables by following,
** (Note: \cmd at the end, not \cmd\git.exe).**
Navigate to the Environmental Variables Editor and find the Path variable in the “System Variables” section. Click Edit… and paste the URL of Git to the end. Save!
Now open a new cmd and type command git. If you are able to see the git usage then it's done.
Now you can execute your command to install your package.
ex: npm install native-base --save
Use Git CMD instead of using Win CMD.
I did install git and tried again and got the same error. But running 'npm install' in a new command prompt window worked for me. Restarting the machine is not required.
Go to Environmental Variables you will find this in Computer Properties->Advance system Setting->Environmental Variables -> Path
Add the path of your git installed int the system.
eg: "C:\Program Files\Git\cmd"
Save it.
Good to go now!!
The issue depends on the command prompt you are using. if you are using your Windows cmd, then it will be fine if you have installed git in your system (note that after installation it gets added to your system path). if you are running on an Anaconda terminal or any other, then you need to install git on your project environment from the terminal.
for anaconda, the problem gets solved by running:
conda install git

python packages open new window

I installed python27 64-bit on windows 7. I also have setuptools and pip installed. Now when I execute command in windows console new console window appear, message is printed in it and close before i can read something from it. e. g. I installed yolk and when type yolk -l in cmd it shows me all packages in new cmd window and close immediately. What should I do if I want all messages in main command window?
When you run pip or easy_install from the command-line, your system will be starting easy_install.exe or pip.exe. As of Python 2.7 x64 these executables have a manifest file to satisfy Windows 7's UAC requirements. You can read a little more about this here, but in short, because the applications could be running with different permissions, a new window is opened.
I don't believe there's a proper fix to get around this, short of downgrading. However, you can bypass the problem by not using the executable files.
Back up and then remove pip.exe, easy_install.exe, and fab.exe (if you have Fabric).
Create a bunch of batch files matching the original binaries' names, and put them in the same folder that had the binaries (default C:\Python27\Scripts).
easy_install.bat
#echo off
easy_install-script.py %*
pip.bat
#echo off
pip-script.py %*
fab.bat
#echo off
fab-script.py %*
With these in place, you should find your command-line use of these tools doesn't spawn a new window. Happy hacking.
I tried these, but still a new terminal opened. So i ran the cmd as an administrator, and python worked fine.
try specifying the commands like so:
c:\python27\python.exe -m easy_install Django==1.6.5v
I have the same problem, but it repairs when I turn off an Antivirus.
try specifying the commands like so:
c:\python27\python.exe -m pip install Django==1.6.5v

Resources