LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-04-2016, 07:49 PM   #1
rivola
LQ Newbie
 
Registered: Nov 2016
Posts: 2

Rep: Reputation: Disabled
please help me use python in virtualenv on linux mint 18


hi,

// Installed Python3 (3.4.5) using this method: http://devmartin.com/blog/2016/04/cr...-xenial-xerus/ //
// subbed in 3.4.5 got as far as //

Creating a virtual environment with python3.4 on Ubuntu 16.04 Xenial Xerus

Ubuntu 16.04 (Xenial Xerus) has been released last week and it ships with python version 3.5. Which is great, because it offers some new features for asynchronous programming. Unfortunately, one library (PySide) that I need for the superb jupyter qtconsole doesn’t support python 3.5 yet. Thus I needed a virtual environment with python 3.4:

Install dependencies:

sudo apt install build-essential checkinstall libreadline-gplv2-dev \
libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \
libbz2-dev openssl
Get python source code:

mkdir -p $HOME/opt
cd $HOME/opt
curl -O https://www.python.org/ftp/python/3....thon-3.4.5.tgz
tar xzvf Python-3.4.5.tgz
cd Python-3.4.5
Configure & install

./configure --enable-shared --prefix=/usr/local LDFLAGS="-Wl,--rpath=/usr/local/lib"
sudo make altinstall

// got the following at end of output //

changing mode of /usr/local/lib/python3.4/lib-dynload/_codecs_kr.cpython-34m.so to 755
changing mode of /usr/local/lib/python3.4/lib-dynload/ to 755
changing mode of /usr/local/lib/python3.4/lib-dynload/__pycache__ to 755
running install_scripts
copying build/scripts-3.4/2to3-3.4 -> /usr/local/bin
copying build/scripts-3.4/idle3.4 -> /usr/local/bin
copying build/scripts-3.4/pydoc3.4 -> /usr/local/bin
copying build/scripts-3.4/pyvenv-3.4 -> /usr/local/bin
changing mode of /usr/local/bin/2to3-3.4 to 755
changing mode of /usr/local/bin/idle3.4 to 755
changing mode of /usr/local/bin/pydoc3.4 to 755
changing mode of /usr/local/bin/pyvenv-3.4 to 755
rm /usr/local/lib/python3.4/lib-dynload/_sysconfigdata.py
rm -r /usr/local/lib/python3.4/lib-dynload/__pycache__
Creating directory /usr/local/share/man/man1
/usr/bin/install -c -m 644 ./Misc/python.man \
/usr/local/share/man/man1/python3.4.1
if test "xupgrade" != "xno" ; then \
case upgrade in \
upgrade) ensurepip="--altinstall --upgrade" ;; \
install|*) ensurepip="--altinstall" ;; \
esac; \
LD_LIBRARY_PATH=/home/user/opt/Python-3.4.5 ./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
The directory '/home/user/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Ignoring indexes: https://pypi.python.org/simple
The directory '/home/user/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-8.1.1 setuptools-20.10.1

// did not know what to do after the above so... ran the following command //

sudo apt-get intall virtualenv

// "seems" to have installed i'm thinking well this is good so i then ran... //

sudo apt-get install python3 virtualenvwrapper

// which towards then end of execution spits out... //

Registering documents with scrollkeeper...
Setting up libjs-jquery (1.11.3+dfsg-4) ...
Setting up libjs-underscore (1.7.0~dfsg-1ubuntu1) ...
Setting up libjs-sphinxdoc (1.3.6-2ubuntu1) ...
Setting up python-pbr (1.8.0-4ubuntu1) ...
update-alternatives: using /usr/bin/python2-pbr to provide /usr/bin/pbr (pbr) in auto mode
Setting up python-stevedore (1.12.0-1) ...
Setting up python-virtualenv (15.0.1+ds-3) ...
Setting up virtualenv-clone (0.2.5-1) ...
Setting up virtualenvwrapper (4.3.1-2) ...


// thinking well that ain't good so i then then ran... //

which virtualenv

// spits out... //

/usr/bin/virtualenv

?????????????????????????????

Ok so i'm a total newb to linux seems i've gotten things a bit confused. Frankencommand approach not good. What are we looking at here? Can someone please tell me based on the above what i need to tweak or add or remove so that i can work with python 3.4 using virtualenv? The plan is if I do it this way then at some point I can use a later or earlier build of python based on my needs in order to program what I want to program. Please don't say "Well why do you need to work with python build xx.xx.xxxx?" Maybe it's me (yeah admittedly i can be dense at times) but i could not find a single well explained tutorial for doing this with these versions.

Thank You for any assistance you might be able to give.

~riv
 
Old 11-04-2016, 08:18 PM   #2
rivola
LQ Newbie
 
Registered: Nov 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
// me again... also //
~ $ python3 --version
// returns... //
Python 3.5.2


ARGH,
rivola
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Mint setup for Python-based development SaintDanBert Linux - Software 3 05-31-2016 03:17 PM
LXer: Setting up the python virtualenv development environment on Debian Linux LXer Syndicated Linux News 0 04-13-2015 12:31 AM
Geany - Activate Python Virtualenv - Bourne Shell Permissions flebber Linux - Software 2 02-03-2014 04:03 AM
New to Python, need some assistance with virtualenv. manwichmakesameal Slackware 2 06-23-2013 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration