python can't showing version - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: python can't showing version (/thread-16649.html) |
python can't showing version - bajjol - Mar-08-2019 i have a problem here when i want to check my python version on cmd, it wasn't showing a version and opened to gpython.exe, i dont know what is going on it is effected to me while im installing django in my environment and the pop up error message say that can't import runpy module RE: python can't showing version - metulburr - Mar-08-2019 you should be able to pass -V argument to python to get your python versionmetulburr@ubuntu:~$ python -V Python 2.7.12 metulburr@ubuntu:~$ python3 -V Python 3.7.2 metulburr@ubuntu:~$ python3.6 -V Python 3.6.1and you can do the same for pip metulburr@ubuntu:~$ pip -V pip 18.0 from /usr/local/lib/python2.7/dist-packages/pip-18.0-py2.7.egg/pip (python 2.7) metulburr@ubuntu:~$ pip3 -V pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)based on researching: runpy should be installed by default with the environment, try delete and creating a new one. Not sure though as i dont use virutal environments. RE: python can't showing version - snippsat - Mar-08-2019 Runpy is installed by default with your environment. Something wrong by you or something else may have happen,creating another one should fix the problem. Here is the basic and venv is now build into Python from 3.6--> Use cmder as cmd is not good at all. C:\code λ python -V Python 3.7.2 C:\code λ pip -V pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7) # Make environment C:\code λ python -m venv test_env # Cd in C:\code λ cd test_env # Activate C:\code\test_env λ C:\code\test_env\Scripts\activate # Now pip should point to environment,not OS install (test_env) C:\code\test_env λ pip -V pip 18.1 from c:\code\test_env\lib\site-packages\pip (python 3.7) # Test install (test_env) C:\code\test_env λ pip install requests Collecting requests ................... Installing collected packages: certifi, idna, urllib3, chardet, requests Successfully installed certifi-2018.11.29 chardet-3.0.4 idna-2.8 requests-2.21.0 urllib3-1.24.1Alternative is pipenv |