Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot install. CommandError: 'xxx' conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name. #359

Open
simonm3 opened this issue Dec 27, 2019 · 14 comments

Comments

@simonm3
Copy link

simonm3 commented Dec 27, 2019

Followed exactly the instructions in the docs but when I get to "djangocms mysite" there is an error every time. Does not matter what I call the project. I am using python 3.7 on windows10

CommandError: 'xxx' conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name.

This is probably a documentation error. Previous version uses "djangocms -p . mysite" which works. The current documentation just says "djangocms mysite" which fails.

@yakky
Copy link
Member

yakky commented Dec 27, 2019

@simonm3 thanks for following up here. Which djangocms-installer version are you using?

I will check on windows, but both versions djangocms mysite and djangocms -p . mysite` should work (and work on my setup). I need to check on windows in the next days as I don't have a windows box at hand.

Validation is pretty basic:

I can provide a dev version which enable a more verbose logging in this section to debug which of the check fails

@simonm3
Copy link
Author

simonm3 commented Dec 27, 2019 via email

@yakky
Copy link
Member

yakky commented Dec 27, 2019

1.2.0 works according to my (and other users) test.
I'd better check what's the behavior on windows 10, but it will take me a couple of days to have a windows box at hand

@shiva-katepalli
Copy link

Hi yakky!!
Any resolution you identified on this issue, I am having same issue on windows 10 system.

@yakky
Copy link
Member

yakky commented Oct 7, 2020

Sorry, I currently don't have a windows box to test the behavior

I very happily welcome some help from people with a windows PC at hand who can test and debug this behavior

@boesee
Copy link

boesee commented Nov 10, 2020

i had the exact same error following the getting started instructions on the django website. also, i'm a windows 10 user. after considering (http://docs.django-cms.org/en/latest/introduction/01-install.html) it worked like a charm. i saw a discrepancy between
(env) $ djangocms mysite
and
mkdir tutorial-project
cd tutorial-project
djangocms mysite

@yakky
Copy link
Member

yakky commented Nov 14, 2020

can't reproduce the issue

See below a test run on a fresh windows 10 box with Python 3.8.6 installed

Just make sure that the current directory where you launch the command is empty and everything should be fine

Microsoft Windows [Version 10.0.17763.379]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\>mkdir site_base

C:\>cd site_base

C:\site_base>python -m venv env

C:\site_base>env\Scripts\activate

(env) C:\site_base>python  --version
Python 3.8.6

(env) C:\site_base>pip install djangocms-installer
Collecting djangocms-installer
  Downloading djangocms_installer-1.2.3-py2.py3-none-any.whl (56 kB)
     |ŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠ| 56 kB 156 kB/s
Collecting tzlocal
  Downloading tzlocal-2.1-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: pip in c:\site_base\env\lib\site-packages (from djangocms-installer) (20.2.1)
Collecting dj-database-url>=0.4
  Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pytz
  Downloading pytz-2020.4-py2.py3-none-any.whl (509 kB)
     |ŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠ| 509 kB 7.7 kB/s
Installing collected packages: pytz, tzlocal, dj-database-url, six, djangocms-installer
Successfully installed dj-database-url-0.5.0 djangocms-installer-1.2.3 pytz-2020.4 six-1.15.0 tzlocal-2.1
WARNING: You are using pip version 20.2.1; however, version 20.2.4 is available.
You should consider upgrading via the 'c:\site_base\env\scripts\python.exe -m pip install --upgrade pip' command.

(env) C:\site_base>djangocms mysite
Creating the project
Please wait while I install dependencies
If I am stuck for a long time, please check for connectivity / PyPi issues
Dependencies installed
Creating the project
Operations to perform:
  Apply all migrations: admin, auth, bootstrap4_alerts, bootstrap4_badge, bootstrap4_card, bootstrap4_carousel, bootstrap4_collapse, bootstrap4_content, bootstrap4_grid, bootstrap4_jumbotron, bootstrap4_link, bootstrap4_listgroup, bootstrap4_media, bootstrap4_picture, bootstrap4_tabs, bootstrap4_utilities, cms, contenttypes, djangocms_file, djangocms_googlemap, djangocms_icon, djangocms_link, djangocms_picture, djangocms_snippet, djangocms_style, djangocms_text_ckeditor, djangocms_video, easy_thumbnails, filer, menus, sessions, sites
Running migrations:
  ... Migrations skipped for brevity ...
Creating admin user
All done!
Get into "C:\site_base\mysite" directory and type "python manage.py runserver" to start your project

(env) C:\site_base>

@boesee
Copy link

boesee commented Nov 16, 2020

Hi there, can't reproduce it either when doing it your way. but i can reproduce it when i CD to \env\Scripts first (before running "activate"). i would create "mysite" in this path (c:\site_base\env\Scripts) and obviously there is a conflict while doing this.

@yakky
Copy link
Member

yakky commented Nov 16, 2020

@boesee thanks for your feedback
I will add a FAQ entry with the above log to clarify the usage

@boesee
Copy link

boesee commented Nov 16, 2020

thx, I appreciate it

@JamesWanjohi
Copy link

Hello.

I cannot get past this error. Here is my workflow.
Using Ubuntu 18.04 LTS
Python = python 3.7.8

pip install --upgrade pip
pip install djangocms-installer
python3 -m venv folder
source folder/bin/activate
mkdir site
cd site
djangocms mysite

runtimeError: CommandError: 'mysite' conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name.

@trustraptor
Copy link

trustraptor commented May 10, 2021

I also had this error trying to install djangocms inside of the virtualenv folder or the vanilla django site folder. create and cd into new folder then run:

djangocms mysite

https://docs.django-cms.org/en/latest/introduction/01-install.html

@kcho
Copy link

kcho commented Sep 25, 2021

I had the same error. I think it's because django.create_project creates the output directory before running the django-admin.py. Commenting out the line below and replacing it to pass solved the error for me.

os.makedirs(config_data.project_directory)

@UdeshPiyumantha
Copy link

I had the same issue when working with wagtail cms. I got this error even there is no such a created app. This occurs when there is an app already that has the same name you need to create inside the site-packages directory.

Once you get this error, you need to check the following directory,

C:\Users\{user}\AppData\Local\Programs\Python\Python38-32\Lib\site-packages

If there is a package with the name same you want to create then you need to remove that package. Also make sure to check that package is important or not before deleting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants