Python Forum
Installaing Package on Multiple versions of installation
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installaing Package on Multiple versions of installation
#1
Windows8(64-bit)

Again noob here first day in Python.

I managed to install version 3.6.1 & 2.7.13, edited ENV variables and can run both distribution as follows

Python2, simply type python
Python3, I renamed the executable to Python3, so you would need to type python3

I also installed 3 IDEs, ATOM, PyCharm & Eclipse. I'm liking ATOM & PyCharm.

but I have a problem, I can install a package!!!

I want to install Beautiful Soup using straight forward 
pip install beautifulsoup4
that is causing me this error: Fatal error in launcher: Unable to create process using '"'

then I tried,
py -3.6 -m pip install beautifulsoap4
but it's giving me Requested Python version (3.6) not installed

here's another attempt, remember I mentioned that I rename the version 3 from python to python3. So I tried this:

python3 -m pip install beautifulsoap4

but that is throwing me:

Collecting beautifulsoap4

Could not find a version that satisfies the require
No matching distribution found for beautifulsoap4

So basically, I'd like to ask... for something like this where I have multiple versions of python, how do I install packages?
Reply
#2
(May-07-2017, 08:38 AM)vetabz Wrote: So basically, I'd like to ask... for something like this where I have multiple versions of python, how do I install packages?


You may try in command line (or in terminal)

pip3 install package_name
Reply
#3
Quote:I want to install Beautiful Soup using straight forward 

pip install beautifulsoup4
that is causing me this error: Fatal error in launcher: Unable to create process using '"'

your advise was similar to what I did, gave it a try but I got the same error as above

Fatal error in launcher: Unable to create process using '"'
Reply
#4
If so you may try this;

you can download the Beautiful Soup 4 source tarball, and install it with setup.py.
Extract the file. Browse to the floder which has setup.py. Right click while pressing shift key & select 'open command window here'.

run the below command. (I think you have already renamed python.exe file as python3.exe)

python3 setup.py install


I hope this'll work.

If it doesn't work, copy bs4 directory from your extracted tarball into your application’s codebase
( it may be something like C:\Programdata\Anaconda3\Lib\site-packages\), and import it as you usually do.
Reply
#5
A hint.
>>> 'beautifulsoap4' == 'beautifulsoup4'
False
So it's pip install beautifulsoup4
Reply
#6
That must be it! I actually uninstalled Python2 so I can move on, but I'm going to bring it back... Some tutorials are in 2 those new ones are based on 3, so I definitely need to have both.
Reply
#7
the pip version is different for python 2.7 and 3.x
make sure you run the one that matches the version of python you are installing for.
pip resides under the python root in the scripts directory.
Reply
#8
You can call diffident version of pip version like this(Windows).
For running python from different version py -2.7 my_prog.py using Python 2.7.
Running python 3.6 python my_prog.py.
C:\
λ py -2.7 -m pip -V
pip 9.0.1 from C:\Python27\lib\site-packages (python 2.7)

C:\
λ py -3.6 -m pip -V
pip 9.0.1 from C:\Python36\lib\site-packages (python 3.6)
I have Python 3.6 as main version,so that what's set in environment Path.                                                        
C:\                                                       
λ pip -V                                                  
pip 9.0.1 from c:\python36\lib\site-packages (python 3.6)

C:\
λ python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
If i want to install to Pytnon 2.7.
C:\
λ py -2.7 -m pip install requests
Collecting requests
  Using cached requests-2.13.0-py2.py3-none-any.whl
Installing collected packages: requests
Successfully installed requests-2.13.0
For 3.6 is just.
C:\
λ pip install requests
Requirement already satisfied: requests in c:\python36\lib\site-packages
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020